/** * @param RouteCollectionBuilder $routes */ protected function configureRoutes(RouteCollectionBuilder $routes) { $routes->add('/', 'kernel:indexAction', 'index'); $routes->add('/fotky', 'kernel:photosAction', 'photos'); $routes->add('/vtip', 'kernel:jokeAction', 'joke'); $routes->add('/kontakt', 'kernel:contactAction', 'contact'); }
/** * {@inheritdoc} */ protected function configureRoutes(RouteCollectionBuilder $routes) { $routes->add('/', 'PandawanAcademyRegistrationBundle:Registration:index', 'homepage'); if (isset($this->bundles['WebProfilerBundle'])) { $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml', '/_wdt'); $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml', '/_profiler'); } }
protected function configureRoutes(RouteCollectionBuilder $routes) { if (in_array($this->getEnvironment(), ['dev'], true)) { $routes->import($this->getRootDir() . '/config/routing_' . $this->getEnvironment() . '.yml'); } else { $routes->import($this->getRootDir() . '/config/routing.yml'); } }
protected function configureRoutes(RouteCollectionBuilder $routes) { if (in_array($this->getEnvironment(), array('dev', 'test'), true)) { $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml', '/_wdt'); $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml', '/_profiler'); } $routes->import('@AppBundle/Controller', '/', 'annotation'); }
protected function configureRoutes(RouteCollectionBuilder $routes) { $routes->import('@MuseBundle/Resources/routing/routing.xml'); if ($this->debug) { $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml', '/_wdt'); $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml', '/_profiler'); } }
protected function configureRoutes(RouteCollectionBuilder $routes) { $routes->addRoute(new Route('/', ['_controller' => 'kernel:indexAction'])); //todo: Implement admin role restriction for the following routes $routes->addRoute((new Route('/user', ['_controller' => 'kernel:createUserAction']))->setMethods(['POST'])); $routes->addRoute((new Route('/user/{username}', ['_controller' => 'kernel:createUserAction']))->setMethods(['PUT'])); $routes->addRoute((new Route('/user/{username}', ['_controller' => 'kernel:deleteUserAction']))->setMethods(['DELETE'])); $routes->addRoute((new Route('/group', ['_controller' => 'kernel:createGroupAction']))->setMethods(['POST'])); $routes->addRoute((new Route('/group/{id}', ['_controller' => 'kernel:deleteGroupAction']))->setMethods(['DELETE'])); $routes->addRoute((new Route('/user-group', ['_controller' => 'kernel:createUserGroupAction']))->setMethods(['POST'])); $routes->addRoute((new Route('/user-group/{username}/{groupId}', ['_controller' => 'kernel:createUserGroupAction']))->setMethods(['PUT'])); $routes->addRoute((new Route('/user-group/{username}/{groupId}', ['_controller' => 'kernel:deleteUserGroupAction']))->setMethods(['DELETE'])); }
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')); }
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')); }
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')); }
/** * Add or import routes into your application. * * $routes->import('config/routing.yml'); * $routes->add('/admin', 'AppBundle:Admin:dashboard', 'admin_dashboard'); * * @param RouteCollectionBuilder $routes */ protected function configureRoutes(RouteCollectionBuilder $routes) { if (isset($_ENV['FORCE_SSL'])) { $routes->setSchemes('https'); } $routes->add('/', 'santa.controller:homepage', 'homepage'); $routes->add('/run', 'santa.controller:run', 'run'); $routes->add('/finish/{hash}', 'santa.controller:finish', 'finish'); $routes->add('/auth', 'santa.controller:authenticate', 'authenticate'); $routes->add('/command', 'santa.controller:command', 'command'); }
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')); } }
/** * {@inheritdoc} */ protected function configureRoutes(RouteCollectionBuilder $routes) { // Specify explicitly the controller $routes->add('/', 'Dunglas\\ActionBundle\\Tests\\Fixtures\\TestBundle\\Action\\DummyAction', 'dummy'); $routes->add('/isolated', 'Dunglas\\ActionBundle\\Tests\\Fixtures\\IsolatedAction\\AnIsolatedAction', 'isolated'); // Use the @Route annotation $routes->import('@TestBundle/Action/', '/', 'annotation'); // Cohabitation between old school controllers and actions $routes->import('@TestBundle/Controller/', '/', 'annotation'); $routes->import('@NotScannedBundle/Controller/', '/', 'annotation'); }
protected function configureRoutes(RouteCollectionBuilder $routes) { $routes->add('/', 'kernel:micro'); }
protected function configureRoutes(RouteCollectionBuilder $routes) { $routes->add('/', 'kernel:halloweenAction'); }
protected function configureRoutes(RouteCollectionBuilder $routes) { $routes->add('/projects/{project}', 'kernel:projectRedirectAction'); $routes->add('/browse/{issue}', 'kernel:issueRedirectAction'); }
protected function configureRoutes(RouteCollectionBuilder $routes) { $routes->add('/{path}', 'kernel:indexAction', 'index')->addRequirements(['path' => '.+'])->addDefaults(['path' => '']); }
/** * Add or import routes into your application. * * $routes->import('config/routing.yml'); * $routes->add('/admin', 'AppBundle:Admin:dashboard', 'admin_dashboard'); * * @param RouteCollectionBuilder $routes */ protected function configureRoutes(RouteCollectionBuilder $routes) { if (isset($_ENV['FORCE_SSL'])) { $routes->setSchemes('https'); } if ($this->getEnvironment() === 'dev') { $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml', '/_wdt'); $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml', '/_profiler'); $routes->import('@TwigBundle/Resources/config/routing/errors.xml', '/_error'); } $routes->add('/', 'santa.controller:homepage', 'homepage'); $routes->add('/run', 'santa.controller:run', 'run'); $routes->add('/finish/{hash}', 'santa.controller:finish', 'finish'); $routes->add('/summary/{hash}', 'santa.controller:summary', 'summary'); $routes->add('/retry/{hash}', 'santa.controller:retry', 'retry'); $routes->add('/auth', 'santa.controller:authenticate', 'authenticate'); }
protected function configureRoutes(RouteCollectionBuilder $routes) { $routes->add('/wirecard/confirm', 'hochstrasser_wirecard.wirecard_controller:confirmAction', 'wirecard_confirm'); }
protected function configureRoutes(RouteCollectionBuilder $routes) { // kernel is a service that points to this class // optional 3rd argument is the route name $routes->add('/', 'kernel:helloAction'); }
protected function configureRoutes(RouteCollectionBuilder $routes) { $routes->add('/', 'kernel:indexAction', 'index'); }
protected function configureRoutes(RouteCollectionBuilder $routes) { $routes->import(__DIR__ . '/Resources/routing/routing.xml'); }
protected function configureRoutes(RouteCollectionBuilder $routes) { $routes->import(__DIR__ . '/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()); }
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'); }