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


PHP AdminInterface::getChildren方法代码示例

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


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

示例1: build

 /**
  * @param \Sonata\AdminBundle\Admin\AdminInterface  $admin
  * @param \Sonata\AdminBundle\Route\RouteCollection $collection
  */
 public function build(AdminInterface $admin, RouteCollection $collection)
 {
     $collection->add('list');
     $collection->add('create');
     $collection->add('batch');
     $collection->add('edit');
     $collection->add('delete');
     $collection->add('show');
     $collection->add('export');
     if ($this->manager->hasReader($admin->getClass())) {
         $collection->add('history', '/audit-history');
         $collection->add('history_view_revision', '/audit-history-view');
     }
     if ($admin->isAclEnabled()) {
         $collection->add('acl', $admin->getRouterIdParameter() . '/acl');
     }
     // an admin can have only one level of nested child
     if ($admin->getParent()) {
         return;
     }
     // add children urls
     foreach ($admin->getChildren() as $children) {
         $collection->addCollection($children->getRoutes());
     }
 }
开发者ID:r1pp3rj4ck,项目名称:SonataAdminBundle,代码行数:29,代码来源:QueryStringBuilder.php

示例2: build

 /**
  * RouteBuilder that allowes slashes in the ids.
  *
  * @param \Sonata\AdminBundle\Admin\AdminInterface $admin
  * @param \Sonata\AdminBundle\Route\RouteCollection $collection
  */
 function build(AdminInterface $admin, RouteCollection $collection)
 {
     $collection->add('list');
     $collection->add('create');
     $collection->add('batch');
     $collection->add('edit', $admin->getRouterIdParameter() . '/edit', array(), array('id' => '.+'));
     $collection->add('delete', $admin->getRouterIdParameter() . '/delete', array(), array('id' => '.+'));
     $collection->add('show', $admin->getRouterIdParameter(), array(), array('id' => '.+', '_method' => 'GET'));
     // add children urls
     foreach ($admin->getChildren() as $children) {
         $collection->addCollection($children->getRoutes());
     }
 }
开发者ID:nzzdev,项目名称:SonataDoctrinePhpcrAdminBundle,代码行数:19,代码来源:PathInfoBuilderSlashes.php

示例3: build

 /**
  * RouteBuilder that allows slashes in the ids.
  *
  * {@inheritDoc}
  */
 function build(AdminInterface $admin, RouteCollection $collection)
 {
     $collection->add('list');
     $collection->add('create');
     $collection->add('batch', null, array(), array('_method' => 'POST'));
     $collection->add('edit', $admin->getRouterIdParameter() . '/edit', array(), array('id' => '.+'));
     $collection->add('delete', $admin->getRouterIdParameter() . '/delete', array(), array('id' => '.+'));
     $collection->add('export');
     $collection->add('show', $admin->getRouterIdParameter() . '/show', array(), array('id' => '.+', '_method' => 'GET'));
     if ($admin->isAclEnabled()) {
         $collection->add('acl', $admin->getRouterIdParameter() . '/acl', array(), array('id' => '.+'));
     }
     // add children urls
     foreach ($admin->getChildren() as $children) {
         $collection->addCollection($children->getRoutes());
     }
 }
开发者ID:Aaike,项目名称:SonataDoctrinePhpcrAdminBundle,代码行数:22,代码来源:PathInfoBuilderSlashes.php


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