You are here

public function MongodbPathAliasStorage::languageAliasExists in MongoDB 8

Checks if there are any aliases with language defined.

Return value

bool TRUE if aliases with language exist.

Overrides AliasStorageInterface::languageAliasExists

File

src/MongodbPathAliasStorage.php, line 203
Contains Drupal\mongodb\Path.

Class

MongodbPathAliasStorage
Provides a class for CRUD operations on path aliases in MongoDB.

Namespace

Drupal\mongodb

Code

public function languageAliasExists() {
  return (bool) $this
    ->mongoCollection()
    ->count([
    'langcode' => Language::LANGCODE_NOT_SPECIFIED,
  ]);
}