function AliasRepository::getBaseQuery

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Path/AliasRepository.php \Drupal\Core\Path\AliasRepository::getBaseQuery()
  2. 10 core/modules/path_alias/src/AliasRepository.php \Drupal\path_alias\AliasRepository::getBaseQuery()
  3. 11.x core/modules/path_alias/src/AliasRepository.php \Drupal\path_alias\AliasRepository::getBaseQuery()

Returns a SELECT query for the path_alias base table.

Return value

\Drupal\Core\Database\Query\SelectInterface A Select query object.

2 calls to AliasRepository::getBaseQuery()
AliasRepository::pathHasMatchingAlias in core/modules/path_alias/src/AliasRepository.php
Check if any alias exists starting with $initial_substring.
WorkspacesAliasRepository::getBaseQuery in core/modules/workspaces/src/WorkspacesAliasRepository.php
Returns a SELECT query for the path_alias base table.
1 method overrides AliasRepository::getBaseQuery()
WorkspacesAliasRepository::getBaseQuery in core/modules/workspaces/src/WorkspacesAliasRepository.php
Returns a SELECT query for the path_alias base table.

File

core/modules/path_alias/src/AliasRepository.php, line 108

Class

AliasRepository
Provides the default path alias lookup operations.

Namespace

Drupal\path_alias

Code

protected function getBaseQuery() {
    $query = $this->connection
        ->select('path_alias', 'base_table');
    $query->condition('base_table.status', 1);
    return $query;
}

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