You are here

public function VariableConfigurationHandler::loadFromDatabase in Configuration Management 7.3

Loads the configuration from the database.

Parameters

string $identifier: The identifier of the configuration to load.

Return value

\Configuration\Configuration A configuration object.

Overrides ConfigurationHandler::loadFromDatabase

File

src/Handlers/VariableConfigurationHandler.php, line 19

Class

VariableConfigurationHandler

Namespace

Configuration\Handlers

Code

public function loadFromDatabase($identifier) {
  $name = $this
    ->getInternalId($identifier);
  $configuration = new Configuration();
  $configuration
    ->setIdentifier($identifier);
  $configuration
    ->setData(variable_get($name, NULL));
  $event = $this
    ->triggerEvent('load_from_database', $configuration);
  return $event->configuration;
}