You are here

function configuration_get_components in Configuration Management 7

Returns the array of supported components.

Parameters

$configuration_source: If set to to TRUE return configuration sources only.

Return value

An array of component labels keyed by the component names.

11 calls to configuration_get_components()
ConfigurationUITest::testMigrateExportUI in tests/configuration.test
Tests the "Migrate Export" page.
configuration_activate_form in ./configuration.admin.inc
Menu Callback Form.
configuration_export_render in ./configuration.export.inc
Render feature export into an array representing its files.
configuration_find_new in ./configuration.module
Look for any configurations that might be new
configuration_get_component_states in ./configuration.export.inc
Retrieve an array of configuration/components and their current states.

... See full list

File

./configuration.module, line 291
Module file for the configuration module, which enables the capture and management of configuration in Drupal.

Code

function configuration_get_components($configuration_source = FALSE, $reset = FALSE) {
  configuration_include();
  static $components_all;
  static $components_source;
  if (!isset($components_all) || $reset) {
    $components_all = $components_source = array();
    foreach (module_implements('configuration_api') as $module) {
      $info = module_invoke($module, 'configuration_api');
      foreach ($info as $k => $v) {
        $components_all[$k] = $v;
        if (!empty($v['configuration_source'])) {
          $components_source[$k] = $v;
        }
      }
    }
  }
  return $configuration_source ? $components_source : $components_all;
}