function AliasStorage::lookupPathAlias
Overrides AliasStorageInterface::lookupPathAlias
File
-
core/
lib/ Drupal/ Core/ Path/ AliasStorage.php, line 224
Class
- AliasStorage
- Provides a class for CRUD operations on path aliases.
Namespace
Drupal\Core\PathCode
public function lookupPathAlias($path, $langcode) {
// See the queries above. Use LIKE for case-insensitive matching.
$select = $this->getBaseQuery()
->fields('base_table', [
'alias',
])
->condition('base_table.path', $this->connection
->escapeLike($path), 'LIKE');
$this->addLanguageFallback($select, $langcode);
$select->orderBy('base_table.id', 'DESC');
return $select->execute()
->fetchField();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.