function AliasRepository::pathHasMatchingAlias
Same name in other branches
- 9 core/modules/path_alias/src/AliasRepository.php \Drupal\path_alias\AliasRepository::pathHasMatchingAlias()
- 10 core/modules/path_alias/src/AliasRepository.php \Drupal\path_alias\AliasRepository::pathHasMatchingAlias()
- 11.x core/modules/path_alias/src/AliasRepository.php \Drupal\path_alias\AliasRepository::pathHasMatchingAlias()
Overrides AliasRepositoryInterface::pathHasMatchingAlias
File
-
core/
lib/ Drupal/ Core/ Path/ AliasRepository.php, line 104
Class
- AliasRepository
- Provides the default path alias lookup operations.
Namespace
Drupal\Core\PathCode
public function pathHasMatchingAlias($initial_substring) {
$query = $this->getBaseQuery();
$query->addExpression(1);
return (bool) $query->condition('base_table.path', $this->connection
->escapeLike($initial_substring) . '%', 'LIKE')
->range(0, 1)
->execute()
->fetchField();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.