本文整理汇总了PHP中Sonata\AdminBundle\Datagrid\ListMapper::addIdentifier方法的典型用法代码示例。如果您正苦于以下问题:PHP ListMapper::addIdentifier方法的具体用法?PHP ListMapper::addIdentifier怎么用?PHP ListMapper::addIdentifier使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sonata\AdminBundle\Datagrid\ListMapper
的用法示例。
在下文中一共展示了ListMapper::addIdentifier方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testAddIdentifier
public function testAddIdentifier()
{
$this->assertFalse($this->listMapper->has('fooName'));
$fieldDescription = $this->getFieldDescriptionMock('fooName', 'fooLabel');
$this->listMapper->addIdentifier($fieldDescription);
$this->assertTrue($this->listMapper->has('fooName'));
}
示例2: configureListFields
/**
* @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');
}
示例3: configureListFields
/**
* {@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');
}
示例4: 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'))));
}
示例5: 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'))));
}
示例6: 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));
}
示例7: 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())));
}
示例8: configureListFields
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'));
}
}
示例9: configureListFields
/**
* {@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')))));
}
}
示例10: configureListFields
protected function configureListFields(ListMapper $listMapper)
{
$listMapper->addIdentifier('id');
$listMapper->add('type.name');
$listMapper->add('year.year');
$listMapper->add('comment');
}
示例11: configureListFields
protected function configureListFields(ListMapper $listMapper)
{
$listMapper
->addIdentifier('id', 'text')
->addIdentifier('title', 'text')
;
}
示例12: configureListFields
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'));
}
}
示例13: 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'));
}
}
示例14: 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');
}
}
示例15: 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()));
}