function composer_manager_has_composer_file in Composer Manager 6
Same name and namespace in other branches
- 7.2 composer_manager.module \composer_manager_has_composer_file()
- 7 composer_manager.module \composer_manager_has_composer_file()
Returns TRUE if at least one module has a composer.json file.
Parameters
array $modules: An array of modules being checked.
Return value
boolean
Deprecated
since 6.x-1.6 https://www.drupal.org/node/2297415
See also
composer_manager_packages_have_changed()
File
- ./
composer_manager.module, line 147 - Provides consolidated management of third-party Composer-compatible packages required by contributed modules.
Code
function composer_manager_has_composer_file(array $modules) {
foreach ($modules as $module) {
$module_path = drupal_get_path('module', $module);
if (file_exists($module_path . '/composer.json')) {
return TRUE;
}
}
return FALSE;
}