function composer_manager_package_dependents in Composer Manager 6.2
Same name and namespace in other branches
- 6 composer_manager.admin.inc \composer_manager_package_dependents()
- 7.2 composer_manager.admin.inc \composer_manager_package_dependents()
- 7 composer_manager.admin.inc \composer_manager_package_dependents()
Returns each installed packages dependents.
Return value
array An associative array of installed packages to their dependents.
Throws
\RuntimeException
1 call to composer_manager_package_dependents()
- composer_manager_packages_page in ./
composer_manager.admin.inc - Page callback; Shows the status of all packages required by contrib.
File
- ./
composer_manager.admin.inc, line 337 - Administrative settings for the Composer Manager module.
Code
function composer_manager_package_dependents() {
$dependents = array();
$json = composer_manager_installed_packages_load();
foreach ($json as $package) {
if (!empty($package['require'])) {
foreach ($package['require'] as $dependent => $version) {
$dependents[$dependent][] = $package['name'];
}
}
}
return $dependents;
}