本文整理汇总了PHP中Sonata\AdminBundle\Route\RouteCollection::remove方法的典型用法代码示例。如果您正苦于以下问题:PHP RouteCollection::remove方法的具体用法?PHP RouteCollection::remove怎么用?PHP RouteCollection::remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sonata\AdminBundle\Route\RouteCollection
的用法示例。
在下文中一共展示了RouteCollection::remove方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configureRoutes
protected function configureRoutes(RouteCollection $collection)
{
//$collection->remove('create');
$collection->remove('delete');
$collection->remove('export');
$collection->remove('show');
}
示例2: configureRoutes
/**
* {@inheritdoc}
*/
protected function configureRoutes(RouteCollection $collection)
{
$collection->remove('create');
$collection->remove('show');
$collection->remove('edit');
$collection->remove('export');
$collection->remove('batch');
}
示例3: configureRoutes
protected function configureRoutes(RouteCollection $collection)
{
// to remove a single route
$collection->remove('delete');
$collection->remove('create');
// OR remove all route except named ones
// $collection->clearExcept(array('list', 'show'));
}
示例4: configureRoutes
protected function configureRoutes(RouteCollection $collection)
{
if (!$this->isDevelopment()) {
// Remove create route in production env
$collection->remove('create');
// Remove delete route in production env
$collection->remove('delete');
}
}
示例5: configureRoutes
protected function configureRoutes(RouteCollection $collection)
{
$collection->add('delivered');
$collection->add('open');
$collection->add('print');
$collection->remove('create');
}
示例6: 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'));
}
示例7: configureRoutes
public function configureRoutes(RouteCollection $collection)
{
$collection->add('ProductUpload');
// add custom action name which you created in controller for which you want to generate route.
$collection->remove('delete');
//$collection->remove('list');
}
示例8: configureRoutes
public function configureRoutes(RouteCollection $collection)
{
$collection->remove('edit');
//remove all route except named ones
//$collection->clearExcept(array('list', 'create', 'delete'));
$collection->add('downloadFile', $this->getRouterIdParameter() . '/download');
}
示例9: configureRoutes
protected function configureRoutes(RouteCollection $collection)
{
// get entity manager
$em = $this->getConfigurationPool()->getContainer()->get('Doctrine')->getManager();
// find all periods
$periods = $em->getRepository('TmcycyitNotificationBundle:HistoryPeriod')->findAll();
// remove create button, if there is one periods
if (count($periods) >= 1) {
$collection->remove('create');
}
}
示例10: configureRoutes
/**
* @param RouteCollection $collection
*/
protected function configureRoutes(RouteCollection $collection)
{
$collection->remove('list')->remove('delete');
}
示例11: configureRoutes
protected function configureRoutes(RouteCollection $collection)
{
$collection->add('refreshCache', 'refreshCache', ['_controller' => $collection->getBaseControllerName() . ':refreshCache']);
$collection->remove('show');
$collection->remove('batch');
$collection->remove('export');
}
示例12: configureRoutes
protected function configureRoutes(RouteCollection $collection)
{
// to remove a single route
$collection->remove('show');
}
示例13: configureRoutes
/**
* {@inheritdoc}
*/
public function configureRoutes(RouteCollection $collection)
{
$collection->remove('edit')->remove('create')->remove('history');
}
示例14: configureRoutes
protected function configureRoutes(RouteCollection $collection)
{
$collection->remove('delete');
$collection->add('block', $this->getRouterIdParameter() . '/block');
}
示例15: configureRoutes
protected function configureRoutes(RouteCollection $collection)
{
$collection->remove("create")->remove("delete");
}