本文整理汇总了PHP中Sonata\AdminBundle\Show\ShowMapper::add方法的典型用法代码示例。如果您正苦于以下问题:PHP ShowMapper::add方法的具体用法?PHP ShowMapper::add怎么用?PHP ShowMapper::add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sonata\AdminBundle\Show\ShowMapper
的用法示例。
在下文中一共展示了ShowMapper::add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configureShowFields
/**
* @param ShowMapper $showMapper
*/
protected function configureShowFields(ShowMapper $showMapper)
{
if ($this->useModel()) {
$showMapper->add('Model')->add('ObjectId')->add('Locale');
}
$showMapper->add('OldUrl')->add('NewUrl');
}
示例2: configureShowFields
protected function configureShowFields(ShowMapper $mapper)
{
$mapper->add('id');
$mapper->add('action');
$mapper->add('objectId');
$mapper->add('objectClass');
$mapper->add('data', 'array', array('template' => 'IbrowsLoggableBundle:Admin:show_array.html.twig'));
$mapper->add('oldData', 'array', array('template' => 'IbrowsLoggableBundle:Admin:show_array.html.twig'));
$mapper->add('loggedAt');
$mapper->add('username');
$mapper->add('sourceUsername');
}
示例3: configureShowFields
/**
* @param ShowMapper $showMapper
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->add('id')->add('rules')->add('description')->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();
}));
}
示例4: configureShowFields
protected function configureShowFields(ShowMapper $mapper)
{
$mapper->add('id');
$mapper->add('action');
$mapper->add('objectId');
$mapper->add('objectClass');
$mapper->add('data', 'array');
$mapper->add('oldData', 'array');
$mapper->add('changeAt');
$mapper->add('username');
}
示例5: configureShowFields
/**
* @param ShowMapper $showMapper
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->add('id')->add('name')->add('phone')->add('adress')->add('description')->add('repIMG')->add('users', 'entity', array('class' => 'AMAPBundle:Account\\User', 'associated_property' => function ($amap) {
return $amap->getUsername();
}))->add('news', 'entity', array('class' => 'AMAPBundle:Announcement\\News', 'associated_property' => function ($amap) {
return $amap->getName();
}))->add('contracts_amap', 'entity', array('class' => 'AMAPBundle:Account\\Contract', 'associated_property' => function ($amap) {
return $amap->getId();
}));
}
示例6: configureShowFields
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->with('tabs.client.basic_data');
$showMapper->add('enabled', null, array('label' => 'client.enabled'));
$showMapper->add('name', null, array('label' => 'client.name'));
$showMapper->add('email', null, array('label' => 'client.email'));
$showMapper->add('phone', null, array('label' => 'client.phone'));
$showMapper->end();
$showMapper->with('tabs.client.invoice_data');
$showMapper->add('invoice_name', null, array('label' => 'client.invoice_name'));
$showMapper->add('invoice_nip', null, array('label' => 'client.invoice_nip'));
$showMapper->add('invoice_address', null, array('label' => 'client.invoice_address'));
}
示例7: testReorder
public function testReorder()
{
$this->assertEquals(array(), $this->admin->getShowGroups());
$fieldDescription1 = $this->getFieldDescriptionMock('fooName1', 'fooLabel1');
$fieldDescription2 = $this->getFieldDescriptionMock('fooName2', 'fooLabel2');
$fieldDescription3 = $this->getFieldDescriptionMock('fooName3', 'fooLabel3');
$fieldDescription4 = $this->getFieldDescriptionMock('fooName4', 'fooLabel4');
$this->showMapper->with('Group1');
$this->showMapper->add($fieldDescription1);
$this->showMapper->add($fieldDescription2);
$this->showMapper->add($fieldDescription3);
$this->showMapper->add($fieldDescription4);
$this->assertEquals(array('Group1' => array('collapsed' => false, 'fields' => array('fooName1' => 'fooName1', 'fooName2' => 'fooName2', 'fooName3' => 'fooName3', 'fooName4' => 'fooName4'), 'description' => false, 'translation_domain' => null, 'class' => false, 'name' => 'Group1')), $this->admin->getShowGroups());
$this->showMapper->reorder(array('fooName3', 'fooName2', 'fooName1', 'fooName4'));
// print_r is used to compare order of items in associative arrays
$this->assertEquals(print_r(array('Group1' => array('collapsed' => false, 'class' => false, 'description' => false, 'translation_domain' => null, 'name' => 'Group1', 'fields' => array('fooName3' => 'fooName3', 'fooName2' => 'fooName2', 'fooName1' => 'fooName1', 'fooName4' => 'fooName4'))), true), print_r($this->admin->getShowGroups(), true));
}
示例8: configureShowFields
/**
* @param ShowMapper $showMapper
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->add('id')->add('name')->add('description')->add('image', 'string', ['template' => 'BellonBundle:Preview:category.preview.show.html.twig'])->add('metaTitle')->add('metaDescription')->add('metaKeywords');
}
示例9: configureShowFields
/**
* @param ShowMapper $showMapper
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->add('stockProductName')->add('stockProductDescription')->add('estimateTime', null, array('label' => 'Estimated Time', 'template' => 'TSProjProductBundle:Admin:time.html.twig'))->add('stockProductQuantity');
}
示例10: configureShowFields
/**
* @param ShowMapper $showMapper
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->add('id')->add('type')->add('releaseDate')->add('rating')->add('name')->add('thumbnail')->add('deleted');
}
示例11: configureShowFields
/**
* @param ShowMapper $showMapper
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->add('id')->add('name')->add('description')->add('itemorder');
}
示例12: configureShowFields
/**
* @param ShowMapper $showMapper
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->add('titre')->add('contenu')->add('media', null, array('label' => 'Image'));
}
示例13: configureShowField
public function configureShowField(ShowMapper $showMapper)
{
$showMapper->add('title', 'text', ['label' => "Название пункта"])->add('id', 'integer', ['label' => "Порядковый номер"])->add('route', 'text', ['label' => "Путь"]);
}
示例14: configureShowFields
/**
* @param ShowMapper $showMapper
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->add('id')->add('intitule');
}
示例15: configureShowFields
/**
* {@inheritdoc}
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->add('site')->add('routeName')->add('pageAlias')->add('type')->add('decorate')->add('name')->add('slug')->add('customUrl')->add('edited');
}