You are here

public function ConfigUpdater::loadFromExtension in Commerce Core 8.2

Loads configuration from extension storage.

Extension storage represents the config/install or config/optional directory of a module, theme, or install profile.

Parameters

string $config_name: The configuration name.

Return value

array|false The configuration data, or FALSE if not found.

Overrides ConfigUpdaterInterface::loadFromExtension

2 calls to ConfigUpdater::loadFromExtension()
ConfigUpdater::import in src/Config/ConfigUpdater.php
Imports configuration from extension storage to active storage.
ConfigUpdater::revert in src/Config/ConfigUpdater.php
Reverts configuration to the values from extension storage.

File

src/Config/ConfigUpdater.php, line 212

Class

ConfigUpdater
Default implementation of the ConfigUpdaterInterface.

Namespace

Drupal\commerce\Config

Code

public function loadFromExtension($config_name) {
  $data = $this->extensionConfigStorage
    ->read($config_name);
  if (!$data) {
    $data = $this->extensionOptionalConfigStorage
      ->read($config_name);
  }
  return $data;
}