You are here

public function AliasStorage::languageAliasExists in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Path/AliasStorage.php \Drupal\Core\Path\AliasStorage::languageAliasExists()

Checks if there are any aliases with language defined.

Return value

bool TRUE if aliases with language exist.

Overrides AliasStorageInterface::languageAliasExists

File

core/lib/Drupal/Core/Path/AliasStorage.php, line 252
Contains \Drupal\Core\Path\AliasStorage.

Class

AliasStorage
Provides a class for CRUD operations on path aliases.

Namespace

Drupal\Core\Path

Code

public function languageAliasExists() {
  return (bool) $this->connection
    ->queryRange('SELECT 1 FROM {url_alias} WHERE langcode <> :langcode', 0, 1, array(
    ':langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
  ))
    ->fetchField();
}