function AliasManager::pathAliasPrefixListRebuild

Same name and namespace in other branches
  1. 11.x core/modules/path_alias/src/AliasManager.php \Drupal\path_alias\AliasManager::pathAliasPrefixListRebuild()

Rebuild the path alias prefix list.

Parameters

string $path: An optional path for which an alias is being inserted.

2 calls to AliasManager::pathAliasPrefixListRebuild()
AliasManager::cacheClear in core/modules/path_alias/src/AliasManager.php
Clears the static caches in alias manager and rebuilds the prefix list.
AliasManager::pathAliasWhitelistRebuild in core/modules/path_alias/src/AliasManager.php
Rebuild the path alias prefix list.

File

core/modules/path_alias/src/AliasManager.php, line 203

Class

AliasManager
The default alias manager implementation.

Namespace

Drupal\path_alias

Code

protected function pathAliasPrefixListRebuild($path = NULL) {
  // When paths are inserted, only rebuild the prefix list if the path has a
  // top level component which is not already in the prefix list.
  if (!empty($path)) {
    if ($this->pathPrefixes
      ->get(strtok($path, '/'))) {
      return;
    }
  }
  $this->pathPrefixes
    ->clear();
}

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