annotate core/lib/Drupal/Core/Routing/BcRoute.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 1fec387a4317
children
rev   line source
Chris@14 1 <?php
Chris@14 2
Chris@14 3 namespace Drupal\Core\Routing;
Chris@14 4
Chris@14 5 use Symfony\Component\Routing\Route;
Chris@14 6
Chris@14 7 /**
Chris@14 8 * A backwards compatibility route.
Chris@14 9 *
Chris@14 10 * When a route is deprecated for another one, and backwards compatibility is
Chris@14 11 * provided, then it's best practice to:
Chris@14 12 * - not duplicate all route definition metadata, to instead have an "as empty
Chris@14 13 * as possible" route
Chris@14 14 * - have an accompanying outbound route processor, that overwrites this empty
Chris@14 15 * route definition with the redirected route's definition.
Chris@14 16 *
Chris@14 17 * @see \Drupal\rest\RouteProcessor\RestResourceGetRouteProcessorBC
Chris@14 18 */
Chris@14 19 class BcRoute extends Route {
Chris@14 20
Chris@14 21 /**
Chris@14 22 * {@inheritdoc}
Chris@14 23 */
Chris@14 24 public function __construct() {
Chris@14 25 parent::__construct('');
Chris@14 26 $this->setOption('bc_route', TRUE);
Chris@14 27 }
Chris@14 28
Chris@14 29 }