function AliasPrefixList::loadMenuPathRoots

Loads menu path roots to prepopulate cache.

2 calls to AliasPrefixList::loadMenuPathRoots()
AliasPrefixList::clear in core/modules/path_alias/src/AliasPrefixList.php
Clears the collected cache entry.
AliasPrefixList::lazyLoadCache in core/modules/path_alias/src/AliasPrefixList.php
Loads the cache if not already done.

File

core/modules/path_alias/src/AliasPrefixList.php, line 71

Class

AliasPrefixList
Cache a list of valid alias prefixes.

Namespace

Drupal\path_alias

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.