RouteEnhancerInterface.php 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace Drupal\Core\Routing\Enhancer;
  3. use Drupal\Core\Routing\EnhancerInterface;
  4. use Symfony\Component\Routing\Route;
  5. @trigger_error('\Drupal\Core\Routing\Enhancer\RouteEnhancerInterface is deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. Instead, you should use \Drupal\Core\Routing\EnhancerInterface. See https://www.drupal.org/node/2894934', E_USER_DEPRECATED);
  6. /**
  7. * A route enhance service to determine route enhance rules.
  8. *
  9. * @deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead,
  10. * you should use \Drupal\Core\Routing\EnhancerInterface.
  11. * See https://www.drupal.org/node/2894934
  12. * Part of the deprecation means that applies() is now called on runtime instead
  13. * of compile time.
  14. */
  15. interface RouteEnhancerInterface extends EnhancerInterface {
  16. /**
  17. * Declares if the route enhancer applies to the given route.
  18. *
  19. * @param \Symfony\Component\Routing\Route $route
  20. * The route to consider attaching to.
  21. *
  22. * @return bool
  23. * TRUE if the check applies to the passed route, False otherwise.
  24. */
  25. public function applies(Route $route);
  26. }