function hook_features_pipe_COMPONENT_alter in Features 7.2
Same name and namespace in other branches
- 6 features.api.php \hook_features_pipe_component_alter()
- 7 features.api.php \hook_features_pipe_COMPONENT_alter()
Module hook. Alter the pipe array for a given component.
This hook should be implemented with the name of the component type in place of `component` in the function name, e.g. `features_pipe_views_alter()` will alter the pipe for the Views component.
Parameters
string[][] $pipe: Format: $[$component][] = $name By reference. The pipe array of further processors that should be called.
string[] $data: An array of machine names for the component in question to be exported.
array $export: An array of all components to be exported with a given feature. Some contrib implementations declare this parameter as by-reference, which allows them to modify it directly. Most implementations only modify the $pipe array. Special keys added to $export only during this alter hook:
- $export['component'] (string), the component being exported.
- $export['module_name'] (string), the module being exported to.
1 function implements hook_features_pipe_COMPONENT_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- views_features_pipe_views_view_alter in includes/
features.ctools.inc - Implements hook_features_pipe_COMPONENT_alter() for views_view.
File
- ./
features.api.php, line 399 - Hooks provided by the features module.
Code
function hook_features_pipe_COMPONENT_alter(&$pipe, $data, $export) {
if (in_array($data, 'my-node-type')) {
$pipe['dependencies'][] = 'mymodule';
}
}