本文整理汇总了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())));
}
示例2: configureListFields
protected function configureListFields(ListMapper $listMapper)
{
$listMapper->addIdentifier('id');
$listMapper->add('type.name');
$listMapper->add('year.year');
$listMapper->add('comment');
}
示例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())));
}
示例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())));
}
示例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));
}
示例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()));
}
示例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' => 'Дата обновления'));
}
示例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');
}
示例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' => 'Ссылка'));
}
示例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())));
}
示例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');
}
示例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');
}
示例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())));
}
示例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())));
}
}
示例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'));
}
}