本文整理汇总了PHP中Sonata\AdminBundle\Show\ShowMapper::with方法的典型用法代码示例。如果您正苦于以下问题:PHP ShowMapper::with方法的具体用法?PHP ShowMapper::with怎么用?PHP ShowMapper::with使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sonata\AdminBundle\Show\ShowMapper
的用法示例。
在下文中一共展示了ShowMapper::with方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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'));
}
示例2: 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));
}
示例3: configureShowFields
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->with('Article')->add('title')->add('authors')->add('keyword')->add('abstract')->add('stateEnd')->add('createAt')->add('topics')->end()->with('Reviewers')->add('reviewers')->end();
}
示例4: configureShowFields
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->with('Social')->end();
}
示例5: configureShowFields
/**
* {@inheritdoc}
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->with('General')->add('username')->add('email')->end();
}
示例6: configureShowFields
/**
* {@inheritdoc}
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->with('General')->add('username')->add('email')->end()->with('Groups')->add('groups')->end()->with('Profile')->add('dateOfBirth')->add('firstname')->add('lastname')->add('gender')->add('phone')->end()->with('Security')->add('token')->add('twoStepVerificationCode')->end();
}
示例7: configureShowFields
protected function configureShowFields(ShowMapper $showMapper)
{
// Fields to be shown on show action
$showMapper->with('Marque')->add('name', null, array('label' => 'Nom'))->add('slug')->add('templates', null, array('label' => 'Liste des templates'))->end();
}
示例8: configureShowFields
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->with('General')->add('nom')->add('description')->add('charte', 'string', array('template' => 'IuchBundle:Charte:show.html.twig'))->add('service')->add('obligatoire')->end();
}
示例9: configureShowFields
/**
* @param ShowMapper $showMapper
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->with('Package General Description')->add('id')->add('packagename')->add('packageAliasname')->add('paperlitId')->end()->with('Package Details')->add('ismagazine')->add('isFasttrack')->add('isSkoar')->add('isDvD1')->add('isDvD2')->add('isDgt')->end()->with('Other Details')->add('duration')->add('coverPrice')->add('youPay')->add('benefit')->end()->with('Package Start and End Date')->add('startFromDate')->add('endDate')->end()->with('Set Priority, Status and Image Details')->add('priority')->add('status')->add('image');
}
示例10: configureShowFields
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->with('Général')->add('user')->add('nom')->end()->with('Entrée')->add('date_donnee')->add('nombre_donne')->end()->with('Sortie')->add('date_rendu')->add('nombre_rendu')->end();
}
示例11: configureShowFields
protected function configureShowFields(ShowMapper $show)
{
$show->with('Computer Info')->add('name', null, array("label" => "field.name"))->add('mac', null, array("label" => "field.mac"))->add('port', null, array("label" => "field.port"))->add('broadcast_ip', null, array("label" => "field.broadcast_ip"))->add('ping_ip', null, array("label" => "field.ping_ip"))->add('ping_port', null, array("label" => "field.ping_port"))->end();
}
示例12: configureShowFields
/**
* {@inheritdoc}
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->with('General')->add('id')->add('title')->add('created_at', null, array('label' => 'Créé le', 'format' => 'd/m/Y à H\\hi'))->add('updated_at', null, array('label' => 'Modifié le', 'format' => 'd/m/Y à H\\hi'))->add('campaign')->add('base_detail')->end();
}
示例13: configureShowFields
/**
* {@inheritdoc}
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$authorizationChecker = $this->getConfigurationPool()->getContainer()->get('security.authorization_checker');
$showMapper->with('General', ['class' => 'col-md-6', 'name' => 'user.general'])->add('username')->add('email')->end()->with('Profile', ['class' => 'col-md-6', 'name' => 'user.profile'])->add('firstname')->add('lastname')->end();
if ($authorizationChecker->isGranted('ROLE_ADMIN')) {
$showMapper->with('Groups', ['class' => 'col-md-12', 'name' => 'security.groups'])->add('groups')->end();
}
}
示例14: configureShowFields
/**
* @param \Sonata\AdminBundle\Show\ShowMapper $showMapper
*
* @return void
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->with('General', array('class' => 'col-md-10'))->add('titre')->add('contenu')->end()->with('Activé sur', array('class' => 'col-md-2'))->add('expertise')->add('atelier')->end()->with('Images')->add('images', 'sonata_type_admin', array('associated_property' => 'path', 'template' => 'PBBijouterieBundle:Admin:images.html.twig', 'required' => false))->end()->with('Video Youtube')->add('video')->end();
}
示例15: configureShowFields
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper->with('Général')->add('user', null, array('label' => 'Utilisateur'))->add('rendu', null, array('label' => 'Rendu'))->add('perdu_vol', null, array('label' => 'Perdu/volé'))->add('type')->end()->with('Entrée/Sortie')->add('date_remise', 'date', array('label' => 'Date de remise', 'format' => 'd/m/Y'))->add('date_rendu', 'date', array('label' => 'Date de rendu', 'format' => 'd/m/Y'))->end()->with('Informations complémentaires')->add('intervenant')->add('commentaire')->end();
}