_module_build_dependents
includes/module.inc, строка 143
- Версии
- 5
_module_build_dependents($files)
Find dependents; modules that are required by other modules.
Adds an array of dependents to the $file
->info array.
Возвращаемое значение
The list of files array with dependents added where applicable.
Код
<?php
function _module_build_dependents($files) {
foreach ($files as $filename => $file) {
if (isset($file->info['dependencies']) && is_array($file->info['dependencies'])) {
foreach ($file->info['dependencies'] as $dependency) {
if (!empty($files[$dependency]) && is_array($files[$dependency]->info)) {
if (!isset($files[$dependency]->info['dependents'])) {
$files[$dependency]->info['dependents'] = array();
}
$files[$dependency]->info['dependents'][] = $filename;
}
}
}
}
return $files;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии