You are here

interface RouteBuilderInterface in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Routing/RouteBuilderInterface.php \Drupal\Core\Routing\RouteBuilderInterface

Rebuilds the route information and dumps it.

Rebuilding the route information is the process of gathering all routing data from .routing.yml files, creating a \Symfony\Component\Routing\RouteCollection object out of it, and dispatching that object as a \Drupal\Core\Routing\RouteBuildEvent to all registered listeners. After that, the \Symfony\Component\Routing\RouteCollection object is used to dump the data. Examples of a dump include filling up the routing table, auto-generating Apache mod_rewrite rules, or auto-generating a PHP matcher class.

Hierarchy

Expanded class hierarchy of RouteBuilderInterface

All classes that implement RouteBuilderInterface

See also

\Drupal\Core\Routing\MatcherDumperInterface

\Drupal\Core\Routing\RouteProviderInterface

Related topics

6 files declare their use of RouteBuilderInterface
EntityOperations.php in core/modules/content_moderation/src/EntityOperations.php
MediaConfigSubscriber.php in core/modules/media/src/EventSubscriber/MediaConfigSubscriber.php
NodeAdminRouteSubscriber.php in core/modules/node/src/EventSubscriber/NodeAdminRouteSubscriber.php
RestConfigSubscriber.php in core/modules/rest/src/EventSubscriber/RestConfigSubscriber.php
SystemConfigSubscriber.php in core/modules/system/src/SystemConfigSubscriber.php

... See full list

File

core/lib/Drupal/Core/Routing/RouteBuilderInterface.php, line 22

Namespace

Drupal\Core\Routing
View source
interface RouteBuilderInterface {

  /**
   * Rebuilds the route information and dumps it.
   *
   * @return bool
   *   Returns TRUE if the rebuild succeeds, FALSE otherwise.
   */
  public function rebuild();

  /**
   * Rebuilds the route information if necessary, and dumps it.
   *
   * @return bool
   *   Returns TRUE if the rebuild occurs, FALSE otherwise.
   */
  public function rebuildIfNeeded();

  /**
   * Sets the router to be rebuilt next time rebuildIfNeeded() is called.
   */
  public function setRebuildNeeded();

}

Members

Namesort descending Modifiers Type Description Overrides
RouteBuilderInterface::rebuild public function Rebuilds the route information and dumps it. 2
RouteBuilderInterface::rebuildIfNeeded public function Rebuilds the route information if necessary, and dumps it. 2
RouteBuilderInterface::setRebuildNeeded public function Sets the router to be rebuilt next time rebuildIfNeeded() is called. 2