public function Config::__construct

Constructs a configuration object.

Parameters

string $name: The name of the configuration object being constructed.

Drupal\Core\Config\StorageInterface $storage: A storage controller object to use for reading and writing the configuration data.

Symfony\Component\EventDispatcher\EventDispatcher $event_dispatcher: The event dispatcher used to notify subscribers.

File

drupal/core/lib/Drupal/Core/Config/Config.php, line 78
Definition of Drupal\Core\Config\Config.

Class

Config
Defines the default configuration object.

Namespace

Drupal\Core\Config

Code

public function __construct($name, StorageInterface $storage, EventDispatcher $event_dispatcher = NULL) {
  $this->name = $name;
  $this->storage = $storage;
  $this->eventDispatcher = $event_dispatcher ? $event_dispatcher : drupal_container()
    ->get('dispatcher');
}