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


PHP RouteCollection::clearExcept方法代码示例

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


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

示例1: testCollection

 public function testCollection()
 {
     $routeCollection = new RouteCollection('base.Code.Route', 'baseRouteName', 'baseRoutePattern', 'baseControllerName');
     $routeCollection->add('view');
     $this->assertTrue($routeCollection->has('view'));
     $routeCollection->remove('view');
     $this->assertFalse($routeCollection->has('view'));
     $routeCollection->add('create');
     $route = $routeCollection->get('create');
     $this->assertInstanceOf('Symfony\\Component\\Routing\\Route', $route);
     $routeCollection->add('view');
     $routeCollection->add('edit');
     $routeCollection->clear();
     $this->assertFalse($routeCollection->has('create'));
     $this->assertFalse($routeCollection->has('view'));
     $this->assertFalse($routeCollection->has('edit'));
     $routeCollection->add('create');
     $routeCollection->add('view');
     $routeCollection->add('edit');
     $routeCollection->add('list');
     $routeCollection->clearExcept(array('create', 'edit'));
     $this->assertTrue($routeCollection->has('create'));
     $this->assertTrue($routeCollection->has('edit'));
     $this->assertFalse($routeCollection->has('view'));
     $this->assertFalse($routeCollection->has('list'));
     $routeCollection->clearExcept('create');
     $this->assertTrue($routeCollection->has('create'));
     $this->assertFalse($routeCollection->has('edit'));
 }
开发者ID:robhunt3r,项目名称:SonataAdminBundle,代码行数:29,代码来源:RouteCollectionTest.php

示例2: configureRoutes

 protected function configureRoutes(RouteCollection $collection)
 {
     // to remove a single route
     $collection->remove('delete');
     // OR remove all route except named ones
     $collection->clearExcept(array('list', 'show'));
 }
开发者ID:WildCodeSchool,项目名称:projet-wildresa,代码行数:7,代码来源:EventsAdmin.php

示例3: configureRoutes

 protected function configureRoutes(RouteCollection $collection)
 {
     $collection->clearExcept(['edit', 'list']);
 }
开发者ID:alpixel,项目名称:AlpixelSeoBundle,代码行数:4,代码来源:AdminMetaTagPattern.php

示例4: configureRoutes

 /**
  * @param RouteCollection $collection
  */
 protected function configureRoutes(RouteCollection $collection)
 {
     $collection->clearExcept(array('list'));
 }
开发者ID:tigranParemuzian,项目名称:AdBundle,代码行数:7,代码来源:AdsAnalyticsAdmin.php

示例5: configureRoutes

 protected function configureRoutes(RouteCollection $collection)
 {
     $collection->clearExcept(['create', 'edit', 'delete', 'batch']);
     $collection->add('see', $this->getRouterIdParameter() . '/see');
     $collection->add('createTranslation', $this->getRouterIdParameter() . '/translate');
 }
开发者ID:alpixel,项目名称:AlpixelCMSBundle,代码行数:6,代码来源:BaseNodeEntityAdmin.php

示例6: configureRoutes

 /**
  * @param RouteCollection $collection
  */
 protected function configureRoutes(RouteCollection $collection)
 {
     $collection->clearExcept(array('list', 'create', 'edit', 'delete'));
 }
开发者ID:VincentLanglet,项目名称:FranceBridge,代码行数:7,代码来源:EventAdmin.php

示例7: configureRoutes

 protected function configureRoutes(RouteCollection $collection)
 {
     $collection->clearExcept(['list', 'batch', 'delete']);
     $collection->add('forwardEdit');
 }
开发者ID:alpixel,项目名称:AlpixelCMSBundle,代码行数:5,代码来源:AdminNode.php

示例8: configureRoutes

 public function configureRoutes(RouteCollection $collection)
 {
     $collection->clearExcept(['list']);
     $collection->add('command');
 }
开发者ID:alpixel,项目名称:AlpixelCMSBundle,代码行数:5,代码来源:AdminTranslation.php

示例9: configureRoutes

 protected function configureRoutes(RouteCollection $collection)
 {
     //        parent::configureRoutes();
     //         $collection->remove('delete');
     //remove all route except named ones
     //         $collection->clearExcept(array('list', 'create', 'delete'));
     $collection->clearExcept(array('edit'));
 }
开发者ID:morustechnology,项目名称:LmcAdmissionBundle,代码行数:8,代码来源:UserAdmin.php

示例10: configureRoutes

 public function configureRoutes(RouteCollection $collection)
 {
     // OR remove all route except named ones
     $collection->clearExcept(array('list', 'edit'));
 }
开发者ID:morustechnology,项目名称:LmcAdmissionBundle,代码行数:5,代码来源:ConfigAdmin.php

示例11: configureRoutes

 /**
  * @inheritdoc
  */
 protected function configureRoutes(RouteCollection $collection)
 {
     $collection->clearExcept(['list', 'show', 'batch', 'export']);
     parent::configureRoutes($collection);
 }
开发者ID:Vesax,项目名称:admin-extra-bundle,代码行数:8,代码来源:ReadOnlyAdmin.php

示例12: configureRoutes

 protected function configureRoutes(RouteCollection $collection)
 {
     $collection->clearExcept(array('list', 'edit', 'batch', 'show'));
 }
开发者ID:TristanBaoui,项目名称:PB,代码行数:4,代码来源:CarouselAdmin.php


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