You are here

function spaces_customizers in Spaces 6.2

Same name and namespace in other branches
  1. 5.2 spaces.module \spaces_customizers()
  2. 6 spaces.module \spaces_customizers()

Retrieve all available customizers.

Parameters

$reset: Optional boolean flag for resetting the static cache.

Return value

Keyed array of customizers.

6 calls to spaces_customizers()
spaces_context_active_contexts_alter in ./spaces.module
Implementation of hook_context_active_contexts_alter().
spaces_customize_form in ./spaces_admin.inc
Feature customization form.
spaces_customize_form_submit in ./spaces_admin.inc
Submit handler for feature customization form.
spaces_customize_form_validate in ./spaces_admin.inc
Validate handler for spaces features form
spaces_features_menu_links_alter in ./spaces.module
Implementation of hook_features_menu_links_alter(). This function is deprecated and is no longer a real drupal_alter() callback. It is invoked directly from spaces_preprocess_page().

... See full list

File

./spaces.module, line 1137

Code

function spaces_customizers($reset = FALSE) {
  static $spaces_customizers;
  if (!isset($spaces_customizers) || $reset) {
    $customizers = module_invoke_all('spaces_customizers');
    foreach ($customizers as $customizer_name => $info) {

      // Load any includes before instantiating its class.
      if (is_array($info)) {
        if (isset($info['file']) && is_file($info['file'])) {
          require_once $info['file'];
        }
        if (isset($info['class']) && class_exists($info['class'])) {
          $class = $info['class'];
          $customizer = new $class();
        }
      }
      else {
        if (is_string($info) && class_exists($info)) {
          $customizer = new $info();
        }
        else {
          if (is_object($info)) {
            $customizer = $info;
          }
        }
      }
      $spaces_customizers[$customizer_name] = $customizer;
    }
  }
  return $spaces_customizers;
}