예제 #1
0
 protected function configureRoutes(RouteCollectionBuilder $routes)
 {
     if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
         $routes->mount('/_wdt', $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml'));
         $routes->mount('/_profiler', $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml'));
     }
     $routes->mount('/', $routes->import(__DIR__ . '/config/routing.yml'));
 }
예제 #2
0
 protected function configureRoutes(RouteCollectionBuilder $routes)
 {
     if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
         $routes->mount('/_wdt', $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml'));
         $routes->mount('/_profiler', $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml'));
     }
     $routes->mount('/', $routes->import('@AppBundle/Controller', 'annotation'));
 }
예제 #3
0
 protected function configureRoutes(RouteCollectionBuilder $routes)
 {
     if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
         $routes->mount('/', $routes->import('@CoreSphereConsoleBundle/Resources/config/routing.yml'));
     }
     $routes->mount('/', $routes->import('@FOSUserBundle/Resources/config/routing/all.xml'));
     $routes->mount('/', $routes->import('@AppBundle/Controller', 'annotation'));
 }
 public function configureRoutes(RouteCollectionBuilder $routes)
 {
     $routes->import(__DIR__ . '/config/routing.yml');
     // import the WebProfilerRoutes, only if the bundle is enabled
     if (isset($this->bundles['WebProfilerBundle'])) {
         $routes->mount('/_wdt', $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml'));
         $routes->mount('/_profiler', $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml'));
     }
 }
예제 #5
0
 protected function configureRoutes(RouteCollectionBuilder $routes)
 {
     // import the WebProfilerRoutes, only if the bundle is enabled
     if (isset($this->bundles['WebProfilerBundle'])) {
         $routes->mount('/_wdt', $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml'));
         $routes->mount('/_profiler', $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml'));
     }
     // load the annotation routes
     $routes->mount('/', $routes->import(__DIR__ . '/../src/AppBundle/Controllers/', 'annotation'));
 }
 protected function configureRoutes(RouteCollectionBuilder $routes)
 {
     // import the WebProfilerRoutes, only if the bundle is enabled
     if (isset($this->bundles['WebProfilerBundle'])) {
         $routes->mount('/_wdt', $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml'));
         $routes->mount('/_profiler', $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml'));
     }
     // load the routes
     $routes->mount('/', $routes->import('@KmeliaFreshBundle/Resources/config/routing.yml'));
 }
 public function testAutomaticRouteNamesDoNotConflict()
 {
     $routes = new RouteCollectionBuilder();
     $adminRoutes = $routes->createBuilder();
     // route 1
     $adminRoutes->add('/dashboard', '');
     $accountRoutes = $routes->createBuilder();
     // route 2
     $accountRoutes->add('/dashboard', '')->setMethods(array('GET'));
     // route 3
     $accountRoutes->add('/dashboard', '')->setMethods(array('POST'));
     $routes->mount('/admin', $adminRoutes);
     $routes->mount('/account', $accountRoutes);
     $collection = $routes->build();
     // there are 2 routes (i.e. with non-conflicting names)
     $this->assertCount(3, $collection->all());
 }
예제 #8
0
 protected function configureRoutes(RouteCollectionBuilder $routes)
 {
     $routes->mount('/', $routes->import(__DIR__ . '/config/routing.yml'));
 }
예제 #9
0
 protected function configureRoutes(RouteCollectionBuilder $routes)
 {
     $routes->mount('/_wdt', $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml'));
     $routes->mount('/_profiler', $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml'));
     $routes->add('/', 'kernel:indexAction', 'index');
 }