You are here

class ReplicationConfigRouteSubscriber in Workspace 8

ReplicationConfigRouteSubscriber class.

Hierarchy

Expanded class hierarchy of ReplicationConfigRouteSubscriber

1 string reference to 'ReplicationConfigRouteSubscriber'
workspace.services.yml in ./workspace.services.yml
workspace.services.yml
1 service uses ReplicationConfigRouteSubscriber
workspace.replication_config_route_subscriber in ./workspace.services.yml
Drupal\workspace\EventSubscriber\ReplicationConfigRouteSubscriber

File

src/EventSubscriber/ReplicationConfigRouteSubscriber.php, line 13

Namespace

Drupal\workspace\EventSubscriber
View source
class ReplicationConfigRouteSubscriber extends RouteSubscriberBase {

  /**
   * Alters the replication config route.
   *
   * @param \Symfony\Component\Routing\RouteCollection $collection
   */
  protected function alterRoutes(RouteCollection $collection) {
    if ($route = $collection
      ->get('replication.settings_form')) {
      $route
        ->setDefault('_controller', ReplicationConfigController::class . '::getForms');
    }
  }

  /**
   * {@inheritdoc}
   */
  public static function getSubscribedEvents() {
    $events = parent::getSubscribedEvents();
    $events[RoutingEvents::ALTER] = [
      'onAlterRoutes',
      100,
    ];
    return $events;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ReplicationConfigRouteSubscriber::alterRoutes protected function Alters the replication config route. Overrides RouteSubscriberBase::alterRoutes
ReplicationConfigRouteSubscriber::getSubscribedEvents public static function Returns an array of event names this subscriber wants to listen to. Overrides RouteSubscriberBase::getSubscribedEvents
RouteSubscriberBase::onAlterRoutes public function Delegates the route altering to self::alterRoutes(). 1