W3cubDocs

/Drupal 8

public function RouteBuilder::destruct

public RouteBuilder::destruct()

Performs destruct operations.

Overrides DestructableInterface::destruct

File

core/lib/Drupal/Core/Routing/RouteBuilder.php, line 213

Class

RouteBuilder
Managing class for rebuilding the router table.

Namespace

Drupal\Core\Routing

Code

public function destruct() {
  // Rebuild routes only once at the end of the request lifecycle to not
  // trigger multiple rebuilds and also make the page more responsive for the
  // user.
  $this->rebuildIfNeeded();
}

© 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!RouteBuilder.php/function/RouteBuilder::destruct/8.1.x