You are here

public function ContainerBuilder::setAlias in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php \Drupal\Core\DependencyInjection\ContainerBuilder::setAlias()

File

core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php, line 103

Class

ContainerBuilder
Drupal's dependency injection container builder.

Namespace

Drupal\Core\DependencyInjection

Code

public function setAlias($alias, $id) {
  $alias = parent::setAlias($alias, $id);

  // As of Symfony 3.4 all aliases are private by default.
  $alias
    ->setPublic(TRUE);
  return $alias;
}