You are here

protected function RouteSubscriber::alterRoutes in Panelizer 8.5

Alters existing routes for a specific collection.

Parameters

\Symfony\Component\Routing\RouteCollection $collection: The route collection for adding routes.

Overrides RouteSubscriberBase::alterRoutes

File

tests/modules/panelizer_test/src/Routing/RouteSubscriber.php, line 13

Class

RouteSubscriber

Namespace

Drupal\panelizer_test\Routing

Code

protected function alterRoutes(RouteCollection $collection) {
  $collection
    ->get('panelizer.wizard.add')
    ->setRequirements([
    '_panelizer_default_access' => 'TRUE',
    '_permission' => 'administer panelizer',
  ]);
  $collection
    ->get('panelizer.wizard.add.step')
    ->setRequirements([
    '_permission' => 'administer panelizer',
  ]);
  $collection
    ->get('panelizer.wizard.edit')
    ->setRequirements([
    '_permission' => 'administer panelizer',
  ]);
  $collection
    ->get('panelizer.wizard.step.context.add')
    ->setRequirements([
    '_permission' => 'administer panelizer',
  ]);
  $collection
    ->get('panelizer.wizard.step.context.edit')
    ->setRequirements([
    '_permission' => 'administer panelizer',
  ]);
  $collection
    ->get('panelizer.wizard.step.context.delete')
    ->setRequirements([
    '_permission' => 'administer panelizer',
  ]);
}