You are here

class RouteSubscriber in Panelizer 8.5

Hierarchy

  • class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface

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\Routing
View 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

Namesort descending Modifiers Type Description Overrides
RouteSubscriber::alterRoutes protected function Alters existing routes for a specific collection. Overrides RouteSubscriberBase::alterRoutes
RouteSubscriberBase::getSubscribedEvents public static function Returns an array of event names this subscriber wants to listen to. 5
RouteSubscriberBase::onAlterRoutes public function Delegates the route altering to self::alterRoutes(). 1