You are here

public function VariablesController::getAllConfigs in Acquia Connector 8

Same name and namespace in other branches
  1. 8.2 src/Controller/VariablesController.php \Drupal\acquia_connector\Controller\VariablesController::getAllConfigs()
  2. 3.x src/Controller/VariablesController.php \Drupal\acquia_connector\Controller\VariablesController::getAllConfigs()

Load configs for all enabled modules.

Return value

array Array of Drupal configs.

1 call to VariablesController::getAllConfigs()
VariablesController::getVariableValue in src/Controller/VariablesController.php
Get a variable value by the variable name.

File

src/Controller/VariablesController.php, line 43

Class

VariablesController
Class MappingController.

Namespace

Drupal\acquia_connector\Controller

Code

public function getAllConfigs() {
  if (!is_null($this->configs)) {
    return $this->configs;
  }
  $this->configs = [];
  $names = \Drupal::configFactory()
    ->listAll();
  foreach ($names as $config_name) {
    $this->configs[$config_name] = $this
      ->config($config_name)
      ->get();
  }
  return $this->configs;
}