Alter library search path to include commons libraries

Multi-profile inheritance not includes the base profile library
path, so this alter hook simply adds the missing path.

Change-Id: I2969085faf444d839a85dfd5002e18f30b0d3d67
This commit is contained in:
Marton Kiss 2016-10-13 14:03:32 +02:00
parent 80edd36288
commit 98e1d18f56
1 changed files with 12 additions and 1 deletions

View File

@ -64,4 +64,15 @@ function _groups_common_filter_process_format($element) {
$function($element);
}
return $element;
}
}
/**
* Implements hook_libraries_search_paths_alter()
*
* Add commons profile libraries to library path as part of the base profile
* inheritance.
*/
function groups_common_libraries_search_paths_alter(&$searchdir) {
$profile_commons = drupal_get_path('profile', 'commons');
$searchdir[] = "$profile_commons/libraries";
}