-
Notifications
You must be signed in to change notification settings - Fork 1
/
panopoly_core.profile.inc
35 lines (31 loc) · 1.07 KB
/
panopoly_core.profile.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* @file
* panopoly_core.profile.inc
*/
/**
* Task handler to set the language to English since that is the only one
* we have at the moment.
*/
function panopoly_core_install_locale_selection(&$install_state) {
$install_state['parameters']['locale'] = 'en';
}
/**
* Task handler to load our install profile and enhance the dependency information
*/
function panopoly_core_install_load_profile(&$install_state) {
// Loading the install profile normally
install_load_profile($install_state);
// Include any dependencies that we might have missed...
$dependencies = $install_state['profile_info']['dependencies'];
foreach ($dependencies as $module) {
$module_info = drupal_parse_info_file(drupal_get_path('module', $module) . '/' . $module . '.info');
if (!empty($module_info['dependencies'])) {
foreach ($module_info['dependencies'] as $dependency) {
$parts = explode(' (', $dependency, 2);
$dependencies[] = array_shift($parts);
}
}
}
$install_state['profile_info']['dependencies'] = array_unique($dependencies);
}