You are here

configuration.module in Configuration Management 7.3

Same filename and directory in other branches
  1. 6 configuration.module
  2. 7 configuration.module
  3. 7.2 configuration.module

File

configuration.module
View source
<?php

use Configuration\ConfigurationManager;
function exportAll() {
  $cm = new ConfigurationManager();
  $cm
    ->registerHandlers()
    ->registerEvents();
  $list = array();
  foreach ($cm
    ->getHandlersTypes() as $type) {
    $identifiers = $cm
      ->getHandlerFromType($type)
      ->getIdentifiers();
    foreach ($identifiers as $id => $label) {
      $list[$type . '.' . $id] = TRUE;
    }
  }
  $cm
    ->exporter()
    ->defineItemsToExport($list)
    ->export();
}
function loadAll() {
  $cm = new ConfigurationManager();
  $cm
    ->registerHandlers()
    ->registerEvents();
  $in_configurations_json = $cm
    ->importer()
    ->loadConfigurationList()
    ->configurations()
    ->getConfigurations();
  $list = array();
  foreach ($in_configurations_json as $group => $configs_in_group) {
    foreach ($configs_in_group as $identifier => $config) {
      $list[$identifier] = TRUE;
    }
  }
  $cm
    ->importer()
    ->defineItemsToImport($list)
    ->import();
}

Functions

Namesort descending Description
exportAll
loadAll