public EntityRevisionRouteEnhancer::applies(Route $route)
Declares if the route enhancer applies to the given route.
\Symfony\Component\Routing\Route $route: The route to consider attaching to.
bool TRUE if the check applies to the passed route, False otherwise.
Overrides RouteEnhancerInterface::applies
public function applies(Route $route) { // Check whether there is any entity revision parameter. $parameters = $route->getOption('parameters') ? : []; foreach ($parameters as $info) { if (isset($info['type']) && strpos($info['type'], 'entity_revision:') === 0) { return TRUE; } } return FALSE; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Routing!Enhancer!EntityRevisionRouteEnhancer.php/function/EntityRevisionRouteEnhancer::applies/8.1.x