<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
* system.
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
private $_repoUrl = NULL;
/**
+ * @param bool $fresh
+ *
* @return CRM_Extension_System
*/
public static function singleton($fresh = FALSE) {
return self::$singleton;
}
+ /**
+ * @param CRM_Extension_System $singleton
+ */
public static function setSingleton(CRM_Extension_System $singleton) {
self::$singleton = $singleton;
}
+ /**
+ * @param array $parameters
+ */
public function __construct($parameters = array()) {
$config = CRM_Core_Config::singleton();
if (!array_key_exists('extensionsDir', $parameters)) {
// TODO: CRM_Extension_Container_Basic( /modules )
// TODO: CRM_Extension_Container_Basic( /vendors )
+ // At time of writing, D6, D7, and WP support cmsRootPath() but J does not
+ $cmsRootPath = $config->userSystem->cmsRootPath();
+ if (NULL !== $cmsRootPath) {
+ $vendorPath = $cmsRootPath . DIRECTORY_SEPARATOR . 'vendor';
+ if (is_dir($vendorPath)) {
+ $containers['cmsvendor'] = new CRM_Extension_Container_Basic($vendorPath, $config->userFrameworkBaseURL . DIRECTORY_SEPARATOR . 'vendor', $this->getCache(), 'cmsvendor');
+ }
+ }
+
$this->fullContainer = new CRM_Extension_Container_Collection($containers, $this->getCache(), 'full');
}
return $this->fullContainer;