*/
public function __construct($parameters = array()) {
$config = CRM_Core_Config::singleton();
- $configKeys = array(
- 'extensionsDir',
- 'extensionsURL',
- 'resourceBase',
- 'userFrameworkBaseURL',
- );
- foreach ($configKeys as $key) {
- if (!array_key_exists($key, $parameters)) {
- $parameters[$key] = $config->{$key};
- }
- }
+ $parameters['extensionsDir'] = CRM_Utils_Array::value('extensionsDir', $parameters, $config->extensionsDir);
+ $parameters['extensionsURL'] = CRM_Utils_Array::value('extensionsURL', $parameters, $config->extensionsURL);
+ $parameters['resourceBase'] = CRM_Utils_Array::value('resourceBase', $parameters, $config->resourceBase);
+ $parameters['userFrameworkBaseURL'] = CRM_Utils_Array::value('userFrameworkBaseURL', $parameters, $config->userFrameworkBaseURL);
if (!array_key_exists('civicrm_root', $parameters)) {
$parameters['civicrm_root'] = $GLOBALS['civicrm_root'];
}