class TestRouteSubscriber
Same name in this branch
- 8.9.x core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php \Drupal\Tests\Core\Routing\TestRouteSubscriber
Same name in other branches
- 9 core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php \Drupal\Tests\views\Unit\EventSubscriber\TestRouteSubscriber
- 9 core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php \Drupal\Tests\Core\Routing\TestRouteSubscriber
- 10 core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php \Drupal\Tests\views\Unit\EventSubscriber\TestRouteSubscriber
- 10 core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php \Drupal\Tests\Core\Routing\TestRouteSubscriber
- 11.x core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php \Drupal\Tests\views\Unit\EventSubscriber\TestRouteSubscriber
- 11.x core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php \Drupal\Tests\Core\Routing\TestRouteSubscriber
Provides a test route subscriber.
Hierarchy
- class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
- class \Drupal\views\EventSubscriber\RouteSubscriber extends \Drupal\Core\Routing\RouteSubscriberBase
- class \Drupal\Tests\views\Unit\EventSubscriber\TestRouteSubscriber extends \Drupal\views\EventSubscriber\RouteSubscriber
- class \Drupal\views\EventSubscriber\RouteSubscriber extends \Drupal\Core\Routing\RouteSubscriberBase
Expanded class hierarchy of TestRouteSubscriber
File
-
core/
modules/ views/ tests/ src/ Unit/ EventSubscriber/ RouteSubscriberTest.php, line 201
Namespace
Drupal\Tests\views\Unit\EventSubscriberView source
class TestRouteSubscriber extends RouteSubscriber {
/**
* The applicable views.
*
* @var array
*/
public $applicableViews;
/**
* {@inheritdoc}
*/
protected function getApplicableViews() {
return $this->applicableViews;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
RouteSubscriber::$state | protected | property | The state key value store. | ||
RouteSubscriber::$viewRouteNames | protected | property | Stores an array of route names keyed by view_id.display_id. | ||
RouteSubscriber::$viewsDisplayPairs | protected | property | Stores a list of view,display IDs which haven't be used in the alter event. | ||
RouteSubscriber::$viewStorage | protected | property | The view storage. | ||
RouteSubscriber::alterRoutes | protected | function | Alters existing routes for a specific collection. | Overrides RouteSubscriberBase::alterRoutes | |
RouteSubscriber::getSubscribedEvents | public static | function | Overrides RouteSubscriberBase::getSubscribedEvents | ||
RouteSubscriber::getViewsDisplayIDsWithRoute | protected | function | Gets all the views and display IDs using a route. | ||
RouteSubscriber::reset | public | function | Resets the internal state of the route subscriber. | ||
RouteSubscriber::routeRebuildFinished | public | function | Stores the new route names after they have been rebuilt. | ||
RouteSubscriber::routes | public | function | Returns a set of route objects. | ||
RouteSubscriber::__construct | public | function | Constructs a \Drupal\views\EventSubscriber\RouteSubscriber instance. | ||
RouteSubscriberBase::onAlterRoutes | public | function | Delegates the route altering to self::alterRoutes(). | 1 | |
TestRouteSubscriber::$applicableViews | public | property | The applicable views. | ||
TestRouteSubscriber::getApplicableViews | protected | function | Returns all views/display combinations with routes. | Overrides RouteSubscriber::getApplicableViews |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.