RouteSubscriber.php
Namespace
Drupal\media_test_ckeditor\RoutingFile
- 
              core/modules/ media/ tests/ modules/ media_test_ckeditor/ src/ Routing/ RouteSubscriber.php 
View source
<?php
namespace Drupal\media_test_ckeditor\Routing;
use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;
/**
 * Listens to the dynamic route events.
 */
class RouteSubscriber extends RouteSubscriberBase {
  
  /**
   * {@inheritdoc}
   */
  public function alterRoutes(RouteCollection $collection) {
    if ($route = $collection->get('media.filter.preview')) {
      $route->setDefault('_controller', '\\Drupal\\media_test_ckeditor\\Controller\\TestMediaFilterController::preview');
    }
  }
}Classes
| Title | Deprecated | Summary | 
|---|---|---|
| RouteSubscriber | Listens to the dynamic route events. | 
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
