W3cubDocs

/Drupal 8

public function ContainerBuilder::setParameter

public ContainerBuilder::setParameter($name, $value)

Sets a parameter.

Parameters

string $name The parameter name:

mixed $value The parameter value:

Overrides Container::setParameter

File

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

Class

ContainerBuilder
Drupal's dependency injection container builder.

Namespace

Drupal\Core\DependencyInjection

Code

public function setParameter($name, $value) {
  if (strtolower($name) !== $name) {
    throw new \InvalidArgumentException("Parameter names must be lowercase: $name");
  }
  parent::setParameter($name, $value);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!DependencyInjection!ContainerBuilder.php/function/ContainerBuilder::setParameter/8.1.x