當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AdminInterface::getRouterIdParameter方法代碼示例

本文整理匯總了PHP中Sonata\AdminBundle\Admin\AdminInterface::getRouterIdParameter方法的典型用法代碼示例。如果您正苦於以下問題:PHP AdminInterface::getRouterIdParameter方法的具體用法?PHP AdminInterface::getRouterIdParameter怎麽用?PHP AdminInterface::getRouterIdParameter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Sonata\AdminBundle\Admin\AdminInterface的用法示例。


在下文中一共展示了AdminInterface::getRouterIdParameter方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: 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

示例2: 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

示例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

示例4: configureRoutes

 /**
  * {@inheritdoc}
  */
 public function configureRoutes(AdminInterface $admin, RouteCollection $collection)
 {
     $collection->add('up', $admin->getRouterIdParameter() . '/up')->add('down', $admin->getRouterIdParameter() . '/down');
 }
開發者ID:endroid,項目名稱:EndroidBehaviorBundle,代碼行數:7,代碼來源:SortableAdminExtension.php

示例5: configureRoutes

 /**
  * {@inheritdoc}
  */
 public function configureRoutes(AdminInterface $admin, RouteCollection $collection)
 {
     $collection->add('details', $admin->getRouterIdParameter() . '/details');
 }
開發者ID:ynloultratech,項目名稱:framework,代碼行數:7,代碼來源:AdminListDetailsExtension.php


注:本文中的Sonata\AdminBundle\Admin\AdminInterface::getRouterIdParameter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。