You are here

protected function AliasWhitelist::loadMenuPathRoots in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Path/AliasWhitelist.php \Drupal\Core\Path\AliasWhitelist::loadMenuPathRoots()

Loads menu path roots to prepopulate cache.

2 calls to AliasWhitelist::loadMenuPathRoots()
AliasWhitelist::clear in core/lib/Drupal/Core/Path/AliasWhitelist.php
Clears the collected cache entry.
AliasWhitelist::lazyLoadCache in core/lib/Drupal/Core/Path/AliasWhitelist.php
Loads the cache if not already done.

File

core/lib/Drupal/Core/Path/AliasWhitelist.php, line 76
Contains \Drupal\Core\Path\AliasWhitelist.

Class

AliasWhitelist
Extends CacheCollector to build the path alias whitelist over time.

Namespace

Drupal\Core\Path

Code

protected function loadMenuPathRoots() {
  if ($roots = $this->state
    ->get('router.path_roots')) {
    foreach ($roots as $root) {
      $this->storage[$root] = NULL;
      $this
        ->persist($root);
    }
  }
}