You are here

function composer_manager_packages_to_install in Composer Manager 7

Same name and namespace in other branches
  1. 6.2 composer_manager.install \composer_manager_packages_to_install()
  2. 6 composer_manager.install \composer_manager_packages_to_install()
  3. 7.2 composer_manager.install \composer_manager_packages_to_install()

Returns a list of packages that need to be installed.

Return value

array

1 call to composer_manager_packages_to_install()
composer_manager_requirements in ./composer_manager.install
Implements hook_requirements().

File

./composer_manager.install, line 98
Install, update, and uninstall functions for the Composer Manager module.

Code

function composer_manager_packages_to_install() {
  $packages = array();
  require_once __DIR__ . '/composer_manager.admin.inc';
  $required = composer_manager_required_packages();
  $installed = composer_manager_installed_packages();
  $combined = array_unique(array_merge(array_keys($required), array_keys($installed)));
  foreach ($combined as $package_name) {
    if (!isset($installed[$package_name])) {
      $packages[] = $package_name;
    }
  }
  return $packages;
}