You are here

protected function ConfigFactory::createConfigObject in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Config/ConfigFactory.php \Drupal\Core\Config\ConfigFactory::createConfigObject()

Creates a configuration object.

Parameters

string $name: Configuration object name.

bool $immutable: Determines whether a mutable or immutable config object is returned.

Return value

\Drupal\Core\Config\Config|\Drupal\Core\Config\ImmutableConfig The configuration object.

2 calls to ConfigFactory::createConfigObject()
ConfigFactory::doGet in core/lib/Drupal/Core/Config/ConfigFactory.php
Returns a configuration object for a given name.
ConfigFactory::doLoadMultiple in core/lib/Drupal/Core/Config/ConfigFactory.php
Returns a list of configuration objects for the given names.

File

core/lib/Drupal/Core/Config/ConfigFactory.php, line 397
Contains \Drupal\Core\Config\ConfigFactory.

Class

ConfigFactory
Defines the configuration object factory.

Namespace

Drupal\Core\Config

Code

protected function createConfigObject($name, $immutable) {
  if ($immutable) {
    return new ImmutableConfig($name, $this->storage, $this->eventDispatcher, $this->typedConfigManager);
  }
  return new Config($name, $this->storage, $this->eventDispatcher, $this->typedConfigManager);
}