You are here

function ctools_component_features_export_options in Features 7.2

Same name and namespace in other branches
  1. 6 includes/features.ctools.inc \ctools_component_features_export_options()
  2. 7 includes/features.ctools.inc \ctools_component_features_export_options()

Master implementation of hook_features_export_options() for all ctools components.

This is not registered as a hook implementation by itself. Instead, it gets called from other implementations, especially those dynamically declared in ctools_features_declare_functions().

Parameters

string $component: Component name.

Return value

string[] Exportable options.

See also

\hook_features_export_options()

File

includes/features.ctools.inc, line 174
Features integration for 'ctools' module.

Code

function ctools_component_features_export_options($component) {
  $options = array();
  ctools_include('export');
  $schema = ctools_export_get_schema($component);
  if ($schema && $schema['export']['bulk export']) {
    if (!empty($schema['export']['list callback']) && function_exists($schema['export']['list callback'])) {
      $options = $schema['export']['list callback']();
    }
    else {
      $options = _ctools_features_export_default_list($component, $schema);
    }
  }
  asort($options);
  return $options;
}