You are here

function composer_manager_package_dependents in Composer Manager 7

Same name and namespace in other branches
  1. 6.2 composer_manager.admin.inc \composer_manager_package_dependents()
  2. 6 composer_manager.admin.inc \composer_manager_package_dependents()
  3. 7.2 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 346
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;
}