當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ListMapper::add方法代碼示例

本文整理匯總了PHP中Sonata\AdminBundle\Datagrid\ListMapper::add方法的典型用法代碼示例。如果您正苦於以下問題:PHP ListMapper::add方法的具體用法?PHP ListMapper::add怎麽用?PHP ListMapper::add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Sonata\AdminBundle\Datagrid\ListMapper的用法示例。


在下文中一共展示了ListMapper::add方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: configureListFields

 /**
  * Список
  *
  * @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())));
 }
開發者ID:it-blaster,項目名稱:redirect-bundle,代碼行數:12,代碼來源:RedirectAdmin.php

示例2: configureListFields

 protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('id');
     $listMapper->add('type.name');
     $listMapper->add('year.year');
     $listMapper->add('comment');
 }
開發者ID:colinbleach,項目名稱:JamJar,代碼行數:7,代碼來源:JamJarAdmin.php

示例3: configureListFields

 /**
  * {@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())));
 }
開發者ID:lzdv,項目名稱:init-cms-bundle,代碼行數:11,代碼來源:UserAdmin.php

示例4: configureListFields

 /**
  * @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())));
 }
開發者ID:it-blaster,項目名稱:translation-bundle,代碼行數:11,代碼來源:TranslationAdmin.php

示例5: configureListFields

 /**
  * {@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));
 }
開發者ID:saberyounis,項目名稱:Sonata-Project,代碼行數:11,代碼來源:ThreadAdmin.php

示例6: configureListFields

 /**
  * {@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()));
 }
開發者ID:johnulist,項目名稱:ecommerce-1,代碼行數:11,代碼來源:OrderElementAdmin.php

示例7: configureListFields

 protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('title', null, array('label' => 'Заголовок'));
     $listMapper->add('description', null, array('label' => 'Описание'));
     $listMapper->add('content', null, array('label' => 'Содержание'));
     $listMapper->add('createdAt', null, array('label' => 'Дата создания'));
     $listMapper->add('updatedAt', null, array('label' => 'Дата обновления'));
 }
開發者ID:svintuskbd,項目名稱:symfony,代碼行數:8,代碼來源:PostAdmin.php

示例8: configureListFields

 /**
  * {@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');
 }
開發者ID:BookWorld1,項目名稱:nom,代碼行數:11,代碼來源:CommentAdmin.php

示例9: configureListFields

 protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('title', null, array('label' => 'Заголовок'))->add('draft');
     $listMapper->add('description', null, array('label' => 'Описание'));
     $listMapper->add('createdAt', null, array('label' => 'Дата создания'));
     $listMapper->add('updatedAt', null, array('label' => 'Дата обновления'));
     $listMapper->add('category', null, array('label' => 'Связанная категория'));
     $listMapper->add('slug', null, array('label' => 'Ссылка'));
 }
開發者ID:svintuskbd,項目名稱:symfony,代碼行數:9,代碼來源:ArticleAdmin.php

示例10: configureListFields

 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())));
 }
開發者ID:kminh,項目名稱:AOTranslationBundle,代碼行數:9,代碼來源:MessageAdmin.php

示例11: configureListFields

 protected function configureListFields(ListMapper $mapper)
 {
     $mapper->addIdentifier('id', null, array('route' => array('name' => 'show')));
     $mapper->add('action');
     $mapper->add('objectId');
     $mapper->add('objectClass');
     $mapper->add('changeAt');
     $mapper->add('username');
 }
開發者ID:fcpauldiaz,項目名稱:IbrowsLoggableBundle,代碼行數:9,代碼來源:ChangeSetAdmin.php

示例12: configureListFields

 protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('id');
     $listMapper->add('team1', 'sonata_type_model', array());
     $listMapper->add('team2', 'sonata_type_model', array());
     $listMapper->add('score1', 'text');
     $listMapper->add('score2', 'text');
     $listMapper->add('startTime', 'datetime');
 }
開發者ID:Euro2016,項目名稱:Euro2016,代碼行數:9,代碼來源:GameAdmin.php

示例13: configureListFields

 protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->addIdentifier('id');
     $listMapper->addIdentifier('getSaleOrderNumber', null, array('label' => 'order_number'));
     $listMapper->add('orderDate', null, array('label' => 'date'));
     if (!$listMapper->getAdmin()->isChild()) {
         $listMapper->addIdentifier('partner', null, array('by_reference' => false, 'label' => 'customer', 'admin_code' => 'app.customer'));
     }
     $listMapper->add('amountUntaxed', 'money', array('label' => 'amount_untaxed', 'currency' => 'CHF'))->add('amountTotal', 'money', array('label' => 'amount_total', 'currency' => 'CHF'))->add('state', 'colored_choice', array('choices' => SaleOrder::getStateChoices(), 'colors' => SaleOrder::getStateColors(), 'catalogue' => 'messages'))->add('_action', 'actions', array('actions' => array('edit' => array())));
 }
開發者ID:Nexotap,項目名稱:Ivory,代碼行數:10,代碼來源:SaleOrderAdmin.php

示例14: configureListFields

 protected function configureListFields(ListMapper $listMapper)
 {
     $listMapper->add('firstname', null, array('label' => 'First name'))->add('lastname', null, array('label' => 'Last name'))->add('year', 'choice', array('label' => 'Year', 'choices' => self::getYearChoices()));
     if ($this->isGranted('EDIT')) {
         $listMapper->add('payment', 'choice', array('label' => 'Payment type', 'choices' => self::getPaymentChoices()));
     }
     $listMapper->add('deposit', null, array('label' => 'Deposit'));
     if ($this->isGranted('EDIT')) {
         $listMapper->add('mailing', 'boolean', array('label' => 'Mailing list', 'editable' => true))->add('_action', 'actions', array('actions' => array('edit' => array(), 'delete' => array())));
     }
 }
開發者ID:HenryTelecom,項目名稱:wwwroot,代碼行數:11,代碼來源:MemberAdmin.php

示例15: configureListFields

 /**
  * {@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'));
     }
 }
開發者ID:PartFire,項目名稱:SonataUserBundle,代碼行數:10,代碼來源:UserAdmin.php


注:本文中的Sonata\AdminBundle\Datagrid\ListMapper::add方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。