public function ContainerBuilder::hasAlias

Returns true if an alias exists under the given identifier.

@api

Parameters

string $id The service identifier:

Return value

Boolean true if the alias exists, false otherwise

2 calls to ContainerBuilder::hasAlias()
ContainerBuilder::findDefinition in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php
Gets a service definition by id or alias.
ContainerBuilder::getAlias in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php
Gets an alias.

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php, line 541

Class

ContainerBuilder
ContainerBuilder is a DI container that provides an API to easily describe services.

Namespace

Symfony\Component\DependencyInjection

Code

public function hasAlias($id) {
  return isset($this->aliases[strtolower($id)]);
}