class BcRoute
Same name in other branches
- 9 core/lib/Drupal/Core/Routing/BcRoute.php \Drupal\Core\Routing\BcRoute
- 10 core/lib/Drupal/Core/Routing/BcRoute.php \Drupal\Core\Routing\BcRoute
- 11.x core/lib/Drupal/Core/Routing/BcRoute.php \Drupal\Core\Routing\BcRoute
A backwards compatibility route.
When a route is deprecated for another one, and backwards compatibility is provided, then it's best practice to:
- not duplicate all route definition metadata, to instead have an "as empty as possible" route
- have an accompanying outbound route processor, that overwrites this empty route definition with the redirected route's definition.
Hierarchy
- class \Drupal\Core\Routing\BcRoute extends \Symfony\Component\Routing\Route
Expanded class hierarchy of BcRoute
See also
\Drupal\rest\RouteProcessor\RestResourceGetRouteProcessorBC
2 files declare their use of BcRoute
- ResourceBase.php in core/
modules/ rest/ src/ Plugin/ ResourceBase.php - RouteSubscriber.php in core/
modules/ path/ src/ Routing/ RouteSubscriber.php
File
-
core/
lib/ Drupal/ Core/ Routing/ BcRoute.php, line 19
Namespace
Drupal\Core\RoutingView source
class BcRoute extends Route {
/**
* {@inheritdoc}
*/
public function __construct() {
parent::__construct('');
$this->setOption('bc_route', TRUE);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
BcRoute::__construct | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.