function AliasPrefixList::loadMenuPathRoots
Same name and namespace in other branches
- 11.x core/modules/path_alias/src/AliasPrefixList.php \Drupal\path_alias\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_aliasCode
protected function loadMenuPathRoots() {
if ($roots = $this->state
->get('router.path_roots')) {
foreach ($roots as $root) {
// Paths in Drupal are case-insensitive.
$root = mb_strtolower($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.