uppdated modules

This commit is contained in:
Bachir Soussi Chiadmi
2017-01-22 16:19:36 +01:00
parent 03be8f82aa
commit 8416e3eea1
748 changed files with 32317 additions and 20900 deletions
@@ -42,7 +42,7 @@
* are declared "dynamically" or are part of a family of components.
*
* 'alter_type': What type of alter hook this hook uses. 'normal' is called
* after the main hook is called. 'inline' is embeded within the default hook
* after the main hook is called. 'inline' is embedded within the default hook
* and may not be implemented by some default hooks.
* 'none' is no alter hook exists. Defaults to 'normal'
*
@@ -157,7 +157,8 @@ function hook_features_export_options() {
* of the module, e.g. the key for `hook_example` should simply be `example`
* The values in the array can also be in the form of an associative array
* with the required key of 'code' and optional key of 'args', if 'args' need
* to be added to the hook.
* to be added to the hook. Alternate it can be an associative array in the
* same style as hook_features_export_files() to add additional files.
*/
function hook_features_export_render($module_name, $data, $export = NULL) {
$code = array();
@@ -309,11 +310,31 @@ function hook_features_pipe_COMPONENT_alter(&$pipe, $data, $export) {
* The module being exported contained in $export['module_name'].
*/
function hook_features_pipe_alter(&$pipe, $data, $export) {
if ($export['component'] == 'node' && in_array($data, 'my-node-type')) {
if ($export['component'] == 'node' && in_array('my-node-type', $data)) {
$pipe['dependencies'][] = 'mymodule';
}
}
/**
* Add extra files to the exported file.
*
* @return array
* An array of files, keyed by file name that will appear in feature and
* with either file_path key to indicate where to copy the file from or
* file_content key to indicate the contents of the file.
*/
function hook_features_export_files($module_name, $export) {
return array('css/main.css' => array('file_content' => 'body {background-color:blue;}'));
}
/**
* Alter the extra files added to the export.
*/
function hook_features_export_files_alter(&$files, $module_name, $export) {
$files['css/main.css']['file_content'] = 'body {background-color:black;}';
}
/**
* @defgroup features_component_alter_hooks Feature's component alter hooks
* @{