You are here

function composer_manager_relative_autoload_path in Composer Manager 6

Same name and namespace in other branches
  1. 6.2 composer_manager.writer.inc \composer_manager_relative_autoload_path()
  2. 7.2 composer_manager.writer.inc \composer_manager_relative_autoload_path()
  3. 7 composer_manager.writer.inc \composer_manager_relative_autoload_path()

Returns the path for the autoloaded directory or class relative to the directory containing the composer.json file.

1 string reference to 'composer_manager_relative_autoload_path'
composer_manager_build_json in ./composer_manager.writer.inc
Builds the JSON array ccontaining the combined requirements of each module's composer.json file.

File

./composer_manager.writer.inc, line 268
Functions related to the creation of the consolidated composer.json file.

Code

function composer_manager_relative_autoload_path(&$path, $key, $module) {
  static $dir_from = NULL;
  if (NULL === $dir_from) {
    $dir_from = composer_manager_file_dir();
  }
  $dir_to = getcwd() . '/' . drupal_get_path('module', $module) . '/' . $path;
  $path = composer_manager_relative_dir($dir_to, $dir_from);
}