You are here

public function ConfigHelper::get in Lightning Core 8.3

Same name and namespace in other branches
  1. 8.5 src/ConfigHelper.php \Drupal\lightning_core\ConfigHelper::get()
  2. 8 src/ConfigHelper.php \Drupal\lightning_core\ConfigHelper::get()
  3. 8.2 src/ConfigHelper.php \Drupal\lightning_core\ConfigHelper::get()
  4. 8.4 src/ConfigHelper.php \Drupal\lightning_core\ConfigHelper::get()

Loads a simple config object from the extension's config.

Parameters

string $id: The config object ID.

Return value

\Drupal\Core\Config\Config The config object.

File

src/ConfigHelper.php, line 115

Class

ConfigHelper
A facade to assist with manipulating default config.

Namespace

Drupal\lightning_core

Code

public function get($id) {
  $data = $this
    ->read($id);
  return $this->configFactory
    ->getEditable($id)
    ->setData($data);
}