class RouteSubscriber in Panelizer 8.5
Hierarchy
- class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
- class \Drupal\panelizer_test\Routing\RouteSubscriber
Expanded class hierarchy of RouteSubscriber
1 string reference to 'RouteSubscriber'
- panelizer_test.services.yml in tests/
modules/ panelizer_test/ panelizer_test.services.yml - tests/modules/panelizer_test/panelizer_test.services.yml
1 service uses RouteSubscriber
- panelizer_test.route_subscriber in tests/
modules/ panelizer_test/ panelizer_test.services.yml - Drupal\panelizer_test\Routing\RouteSubscriber
File
- tests/
modules/ panelizer_test/ src/ Routing/ RouteSubscriber.php, line 8
Namespace
Drupal\panelizer_test\RoutingView source
class RouteSubscriber extends RouteSubscriberBase {
/**
* {@inheritdoc}
*/
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',
]);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RouteSubscriber:: |
protected | function |
Alters existing routes for a specific collection. Overrides RouteSubscriberBase:: |
|
RouteSubscriberBase:: |
public static | function | Returns an array of event names this subscriber wants to listen to. | 5 |
RouteSubscriberBase:: |
public | function | Delegates the route altering to self::alterRoutes(). | 1 |