function features_override_get_overrides

cis7 features_override.export.inc features_override_get_overrides($component_key = FALSE, $element_key = FALSE, $reset = FALSE, $all = TRUE)
cle7 features_override.export.inc features_override_get_overrides($component_key = FALSE, $element_key = FALSE, $reset = FALSE, $all = TRUE)
elmsmedia7 features_override.export.inc features_override_get_overrides($component_key = FALSE, $element_key = FALSE, $reset = FALSE, $all = TRUE)
icor7 features_override.export.inc features_override_get_overrides($component_key = FALSE, $element_key = FALSE, $reset = FALSE, $all = TRUE)
meedjum_blog7 features_override.export.inc features_override_get_overrides($component_key = FALSE, $element_key = FALSE, $reset = FALSE, $all = TRUE)
mooc7 features_override.export.inc features_override_get_overrides($component_key = FALSE, $element_key = FALSE, $reset = FALSE, $all = TRUE)

Calculautes what overrides exist for by component/element.

Parameters

$component_key: A component key that's defined via hook_features_api.

$element_key: A key identifieing an element that's been overriden.

$reset: Reset the internal cache of overrides gathered.

$all: If TRUE, return all overrides, otherwise only overrides not yet in an override feature

4 calls to features_override_get_overrides()
features_overrides_features_export_options in sites/all/modules/ulmus/features_override/features_override.features.inc
Implements hook_features_export_options().
features_overrides_features_export_render in sites/all/modules/ulmus/features_override/features_override.features.inc
Implements hook_features_export_render().
features_override_items_features_export_options in sites/all/modules/ulmus/features_override/features_override.features.inc
Implements hook_features_export_options().
features_override_render_differences in sites/all/modules/ulmus/features_override/features_override.admin.inc
Renders the differences for a component and element

File

sites/all/modules/ulmus/features_override/features_override.export.inc, line 79
Helper function to export features overrides.

Code

function features_override_get_overrides($component_key = FALSE, $element_key = FALSE, $reset = FALSE, $all = TRUE) {
  static $cache;
  if (!isset($cache) || $reset) {
    $cache = array();
    module_load_include('inc', 'features', 'features.export');
    features_include();
    foreach (features_get_components() as $component => $info) {
      if (empty($info['default_hook']) || $component == 'features_override_items' || $component == 'features_overrides' || !features_get_default_alter_hook($component) || !features_hook($component, 'features_export_render')) {
        continue;
      }

      features_include_defaults($component);
      foreach (module_implements($info['default_hook']) as $module) {
        if ($differences = array_filter(features_override_module_component_overrides($module, $component, $reset, $all))) {
          $cache[$component] = isset($cache[$component]) ? array_merge($differences, $cache[$component]) : $differences;
        }
      }
      $cache[$component] = isset($cache[$component]) ? array_filter($cache[$component]) : array();
    }
  }

  if ($component_key && $element_key) {
    return !empty($cache[$component_key][$element_key]) ? $cache[$component_key][$element_key] : array();
  }
  elseif ($component_key) {
    return !empty($cache[$component_key]) ? $cache[$component_key] : array();
  }
  return $cache;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.