当前位置: 首页>>代码示例>>PHP>>正文


PHP ListMapper::getAdmin方法代码示例

本文整理汇总了PHP中Sonata\AdminBundle\Datagrid\ListMapper::getAdmin方法的典型用法代码示例。如果您正苦于以下问题:PHP ListMapper::getAdmin方法的具体用法?PHP ListMapper::getAdmin怎么用?PHP ListMapper::getAdmin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sonata\AdminBundle\Datagrid\ListMapper的用法示例。


在下文中一共展示了ListMapper::getAdmin方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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

示例2: configureListFields

 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'))));
 }
开发者ID:Nexotap,项目名称:Ivory,代码行数:8,代码来源:PayrollAdmin.php

示例3: configureListFields

 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'))));
 }
开发者ID:Nexotap,项目名称:Ivory,代码行数:8,代码来源:VacationAdmin.php

示例4: configureListFields

 /**
  * {@inheritdoc}
  */
 public function configureListFields(ListMapper $list)
 {
     $currency = $this->currencyDetector->getCurrency()->getLabel();
     $list->addIdentifier('id')->addIdentifier('reference');
     if (!$list->getAdmin()->isChild()) {
         $list->addIdentifier('customer');
     }
     $list->add('paymentMethod')->add('deliveryMethod')->add('locale')->add('status', 'string', array('template' => 'SonataOrderBundle:OrderAdmin:list_status.html.twig'))->add('deliveryStatus', 'string', array('template' => 'SonataOrderBundle:OrderAdmin:list_delivery_status.html.twig'))->add('paymentStatus', 'string', array('template' => 'SonataOrderBundle:OrderAdmin:list_payment_status.html.twig'))->add('validatedAt')->add('totalInc', 'currency', array('currency' => $currency))->add('totalExcl', 'currency', array('currency' => $currency));
 }
开发者ID:Dicoding,项目名称:ecommerce,代码行数:12,代码来源:OrderAdmin.php

示例5: 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

示例6: configureListFields

 /**
  * {@inheritdoc}
  */
 public function configureListFields(ListMapper $list)
 {
     $this->eventDispatcher->dispatch('sonata.admin.event.configure.list', new ConfigureEvent($list->getAdmin(), $list, ConfigureEvent::TYPE_LIST));
 }
开发者ID:saberyounis,项目名称:Sonata-Project,代码行数:7,代码来源:AdminEventExtension.php


注:本文中的Sonata\AdminBundle\Datagrid\ListMapper::getAdmin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。