php Sonata-AdminBundle-Datagrid-ListMapper类(方法)实例源码

下面列出了php Sonata-AdminBundle-Datagrid-ListMapper 类(方法)源码代码实例,从而了解它的用法。

作者:colinbleac    项目:JamJa   
protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('id');
     $listMapper->add('type.name');
     $listMapper->add('year.year');
     $listMapper->add('comment');
 }

作者:c4d3    项目:mcsuite-application-eyeofende   
protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('id')->add('username')->add('email')->add('lastIp')->add('location')->add('groups')->add('_action', 'actions', array('actions' => array('edit' => array(), 'delete' => array()), "label" => 'actions'));
     if ($this->isGranted('ROLE_ALLOWED_TO_SWITCH')) {
         $listMapper->add('impersonating', 'string', array('template' => 'SonataAdminBundle:Admin:Field/impersonating.html.twig'));
     }
 }

作者:xxspartan1    项目:BMS-Marke   
protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper
         ->addIdentifier('id', 'text')
         ->addIdentifier('title', 'text')
     ;
 }

作者:it-blaste    项目:redirect-bundl   
/**
  * Список
  *
  * @param ListMapper $listMapper
  */
 protected function configureListFields(ListMapper $listMapper)
 {
     if ($this->useModel()) {
         $listMapper->add('Model')->add('ObjectId')->add('Locale');
     }
     $listMapper->add('OldUrlShort', null, array('label' => 'Старый адрес'))->add('NewUrlShort', null, array('label' => 'Новый адрес'))->add('_action', 'actions', array('actions' => array('edit' => array(), 'delete' => array())));
 }

作者:lyssa    项目:utilisateur-bundl   
/**
  * {@inheritdoc}
  */
 protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('username')->add('email')->add('groups')->add('enabled', null, array('editable' => true))->add('locked', null, array('editable' => true))->add('createdAt');
     if ($this->isGranted('ROLE_ALLOWED_TO_SWITCH')) {
         $listMapper->add('impersonating');
     }
 }

作者:sonata-projec    项目:ecommerc   
/**
  * @param \Sonata\AdminBundle\Datagrid\ListMapper $list
  */
 public function configureListFields(ListMapper $list)
 {
     if (!$this->isChild()) {
         $list->addIdentifier('id')->addIdentifier('product', null, array('admin_code' => 'sonata.product.admin.product'));
     }
     $list->addIdentifier('code')->add('enabled')->add('perItem')->add('countryCode')->add('zone');
 }

作者:johnulis    项目:ecommerce-   
/**
  * {@inheritdoc}
  */
 public function configureListFields(ListMapper $list)
 {
     if (!$this->isChild()) {
         $list->addIdentifier('id')->addIdentifier('product', null, array('admin_code' => 'sonata.product.admin.product'));
     }
     $list->addIdentifier('category');
 }

作者:manudatta1    项目:PO   
protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('username')->add('email')->add('groups')->add('facebookName', array(), array('label' => 'Fb Name'))->add('gender', array(), array('label' => 'Gender'))->add('locale', array(), array('label' => 'Language'))->add('biography', array(), array('label' => 'Biography'))->add('enabled', null, array('editable' => true));
     if ($this->isGranted('ROLE_ALLOWED_TO_SWITCH')) {
         $listMapper->add('impersonating', 'string', array('template' => 'SonataUserBundle:Admin:Field/impersonating.html.twig'));
     }
 }

作者:PartFir    项目:SonataUserBundl   
/**
  * {@inheritdoc}
  */
 protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('username')->add('email')->add('groups')->add('enabled', null, array('editable' => true))->add('locked', null, array('editable' => true))->add('createdAt');
     if ($this->isGranted('ROLE_ALLOWED_TO_SWITCH')) {
         $listMapper->add('impersonating', 'string', array('template' => 'SonataUserBundle:Admin:Field/impersonating.html.twig'));
     }
 }

作者:bruer    项目:platfor   
/**
  * {@inheritdoc}
  */
 protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('username')->add('email', null, array('footable' => array('attr' => array('data-breakpoints' => array('xs', 'sm')))))->add('enabled', null, array('editable' => true, 'footable' => array('attr' => array('data-breakpoints' => array('xs')))))->add('locked', null, array('editable' => true, 'footable' => array('attr' => array('data-breakpoints' => array('xs')))))->add('createdAt', null, array('footable' => array('attr' => array('data-breakpoints' => array('xs', 'sm', 'md')))));
     if ($this->isGranted('ROLE_ALLOWED_TO_SWITCH')) {
         $listMapper->add('impersonating', 'string', array('template' => 'BrueryUserBundle:Admin:Field/impersonating.html.twig', 'footable' => array('attr' => array('data-breakpoints' => array('all')))));
     }
 }

作者:Nexota    项目:Ivor   
protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('id')->add('getPeriod', null, array('format' => 'M. Y'));
     if (!$listMapper->getAdmin()->isChild()) {
         $listMapper->addIdentifier('employee');
     }
     $listMapper->add('getPayoff')->add('createdAt')->add('_action', 'actions', array('actions' => array('show' => array(), 'edit' => array(), 'print' => array('template' => 'CRUD/list__action_print.html.twig'))));
 }

作者:Nexota    项目:Ivor   
protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('id')->add('startDate', null, array('label' => 'first_day', 'format' => 'd. M. Y'))->add('endDate', null, array('label' => 'last_day', 'format' => 'd. M. Y'));
     if (!$listMapper->getAdmin()->isChild()) {
         $listMapper->addIdentifier('employee');
     }
     $listMapper->add('days', null, array('label' => 'days'))->add('stateName', null, array('template' => 'CRUD/list_string_translated.html.twig'))->add('comment')->add('createdAt')->add('_action', 'actions', array('actions' => array('show' => array(), 'edit' => array(), 'print' => array('template' => 'CRUD/list__action_print.html.twig'))));
 }

作者:saberyouni    项目:Sonata-Projec   
/**
  * {@inheritdoc}
  */
 protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('id');
     if (interface_exists('Sonata\\ClassificationBundle\\Model\\CategoryInterface')) {
         $listMapper->add('category');
     }
     $listMapper->add('permalink', 'text')->add('numComments')->add('isCommentable', 'boolean', array('editable' => true));
 }

作者:Nexota    项目:Ivor   
protected function configureListFields(ListMapper $listMapper)
 {
     if (!$this->hasParentFieldDescription()) {
         // this Admin is not embedded
         $listMapper->add('saleOrder');
     }
     $listMapper->addIdentifier('productNumber', null, array('label' => 'product_number'))->add('shortName', null, array('label' => 'name'))->add('basePrice', null, array('label' => 'base_price'))->add('_action', 'actions', array('actions' => array('edit' => array())));
 }

作者:it-blaste    项目:translation-bundl   
/**
  * @param ListMapper $listMapper
  */
 protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->add('aliasShort', null, array('sortable' => false));
     foreach ($this->getConfigurationPool()->getContainer()->getParameter('it_blaster_translation.locales') as $locale) {
         $listMapper->add('title' . $locale, null, array('label' => $locale, 'sortable' => false, 'editable' => true));
     }
     $listMapper->add('_action', 'actions', array('label' => 'Редактирование', 'actions' => array('edit' => array(), 'delete' => array())));
 }

作者:BookWorld    项目:no   
/**
  * {@inheritdoc}
  */
 protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('name')->add('getStatusCode', 'text', array('label' => 'status_code', 'sortable' => 'status'));
     if (!$this->isChild()) {
         $listMapper->add('post');
     }
     $listMapper->add('email')->add('url')->add('message');
 }

作者:johnulis    项目:ecommerce-   
/**
  * {@inheritdoc}
  */
 public function configureListFields(ListMapper $list)
 {
     $list->addIdentifier('id');
     if (!$list->getAdmin()->isChild()) {
         $list->add('order');
     }
     $list->add('productType')->add('getStatusName', 'trans', array('name' => 'status', 'catalogue' => 'SonataOrderBundle', 'sortable' => 'status'))->add('getDeliveryStatusName', 'trans', array('name' => 'deliveryStatus', 'catalogue' => 'SonataOrderBundle', 'sortable' => 'deliveryStatus'))->add('getTotalWithVat', 'currency', array('currency' => $this->currencyDetector->getCurrency()->getLabel()))->add('getTotal', 'currency', array('currency' => $this->currencyDetector->getCurrency()->getLabel()));
 }

作者:ProjetColibriMSI    项目:AMA   
/**
  * @param ListMapper $listMapper
  */
 protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('id')->add('rules')->add('description', 'html')->add('adressDelivery')->add('signDate')->add('expirationDate')->add('repPDF')->add('users', 'entity', array('class' => 'AMAPBundle:Account\\User', 'associated_property' => function ($amap) {
         return $amap->getUsername();
     }))->add('amap', 'contracts_amap', array('class' => 'AMAPBundle:AMAP\\AMAP', 'associated_property' => function ($amap) {
         return $amap->getName();
     }))->add('_action', null, array('actions' => array('show' => array(), 'edit' => array(), 'delete' => array())));
 }

作者:lzd    项目:init-cms-bundl   
/**
  * {@inheritdoc}
  */
 protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('username')->add('email')->add('groups')->add('enabled', null, array('editable' => true));
     if ($this->isGranted('ROLE_ALLOWED_TO_SWITCH')) {
         $listMapper->add('impersonating', 'string', array('template' => 'NetworkingInitCmsBundle:Admin:Field/impersonating.html.twig'));
     }
     $listMapper->add('_action', 'actions', array('label' => ' ', 'actions' => array('edit' => array(), 'delete' => array())));
 }

作者:kmin    项目:AOTranslationBundl   
protected function configureListFields(ListMapper $listMapper)
 {
     $locales = $this->container->getParameter('ao_translation.locales');
     $listMapper->addIdentifier('id')->add('domain')->add('identification');
     foreach ($locales as $locale => $label) {
         $listMapper->add($locale, null, array('template' => 'AOTranslationBundle:MessageAdmin:translation.html.twig', 'label' => $label, 'code' => 'getLocaleTranslation', 'parameters' => array($locale)));
     }
     $listMapper->add('_action', 'actions', array('actions' => array('edit' => array(), 'delete' => array())));
 }


问题


面经


文章

微信
公众号

扫码关注公众号