Commit 2f4b426c authored by totten's avatar totten

CRM-20243 - Civi\Core\Paths - Define 'civicrm.packages' variable (etal)

In the long run, the file location of the `packages`, `vendor`, and
`bower_components` should be adjustable (depending on how the codebase is
built).

This patch begins loosening the coupling between the `$civicrm_root` and
those folders.
parent a24ca516
......@@ -34,6 +34,24 @@ class Paths {
->register('civicrm.root', function () {
return \CRM_Core_Config::singleton()->userSystem->getCiviSourceStorage();
})
->register('civicrm.packages', function () {
return array(
'path' => \Civi::paths()->getPath('[civicrm.root]/packages/'),
'url' => \Civi::paths()->getUrl('[civicrm.root]/packages/'),
);
})
->register('civicrm.vendor', function () {
return array(
'path' => \Civi::paths()->getPath('[civicrm.root]/vendor/'),
'url' => \Civi::paths()->getUrl('[civicrm.root]/vendor/'),
);
})
->register('civicrm.bower', function () {
return array(
'path' => \Civi::paths()->getPath('[civicrm.root]/bower_components/'),
'url' => \Civi::paths()->getUrl('[civicrm.root]/bower_components/'),
);
})
->register('civicrm.files', function () {
return \CRM_Core_Config::singleton()->userSystem->getDefaultFileStorage();
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment