You are here

function composer_manager_initialized in Composer Manager 8

Returns whether Composer Manager has been initialized.

Parameters

string $root: The app root.

Return value

bool True if Composer Manager has been initialized, false otherwise.

3 calls to composer_manager_initialized()
composer_manager_drush_pm_post_download in ./composer_manager.drush.inc
Implements hook_drush_pm_post_download().
composer_manager_requirements in ./composer_manager.install
Implements hook_requirements().
PackageController::page in src/Controller/PackageController.php
Shows the status of all required packages.

File

./composer_manager.module, line 38
Allows contributed modules to require external libraries via Composer.

Code

function composer_manager_initialized($root = NULL) {
  $root = $root ?: \Drupal::root();
  $package = \Drupal\composer_manager\JsonFile::read($root . '/composer.json');
  return isset($package['scripts']['drupal-rebuild']);
}