protected function AliasWhitelist::loadMenuPathRoots

protected AliasWhitelist::loadMenuPathRoots()

Loads menu path roots to prepopulate cache.

File

core/lib/Drupal/Core/Path/AliasWhitelist.php, line 71

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);
    }
  }
}

© 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!Path!AliasWhitelist.php/function/AliasWhitelist::loadMenuPathRoots/8.1.x