}
return civicrm_api3_create_success($result, $params, 'setting', 'getfields');
}
-/*
+
+/**
* Alter metadata for getfields functions
*/
function _civicrm_api3_setting_getfields_spec(&$params) {
$params['component_id'] = array('title' => 'id of relevant component');
$params['profile'] = array('title' => 'profile is passed through to hooks & added to cachestring');
}
-/*
+
+/**
* Return default values for settings. We will domain key this as it could vary by domain (ie. urls)
* as we will be creating the option for a function rather than an value to be in the defaults
* Note that is not in place as yet
}
return civicrm_api3_create_success($defaults,$params,'setting','getfields');
}
-/*
-* Metadata for setting create function
-*
-* @param array $params parameters as passed to the API
-*/
+/**
+ * Metadata for setting create function
+ *
+ * @param array $params parameters as passed to the API
+ */
function _civicrm_api3_setting_getdefaults_spec(&$params) {
$params['domain_id'] = array(
'api.default' => 'current_domain',
an array or "all" are acceptable values for multiple domains'
);
}
-/*
+
+/**
* Revert settings to defaults
*/
function civicrm_api3_setting_revert(&$params){
return civicrm_api3_create_success($result, $params, 'setting', 'revert');
}
-/*
+
+/**
* Alter metadata for getfields functions
-*/
+ */
function _civicrm_api3_setting_revert_spec(&$params) {
$params['name'] = array('title' => 'Setting Name belongs to');
$params['component_id'] = array('title' => 'id of relevant component');
);
}
-/*
+/**
* Revert settings to defaults
-*/
+ */
function civicrm_api3_setting_fill(&$params){
$defaults = civicrm_api('setting','getdefaults', $params);
$domains = _civicrm_api3_setting_getDomainArray($params);
}
return civicrm_api3_create_success($result, $params, 'setting', 'fill');
}
-/*
+
+/**
* Alter metadata for getfields functions
-*/
+ */
function _civicrm_api3_setting_fill_spec(&$params) {
$params['name'] = array('title' => 'Setting Name belongs to');
$params['component_id'] = array('title' => 'id of relevant component');
$result = CRM_Core_BAO_Setting::setItems($params, $domains);
return civicrm_api3_create_success($result,$params,'setting','create');
}
-/*
+
+/**
* Metadata for setting create function
*
* @param array $params parameters as passed to the API
$result = $result = CRM_Core_BAO_Setting::getItems($params, $domains, CRM_Utils_Array::value('return', $params, array()));
return civicrm_api3_create_success($result,$params,'setting','get');
}
-/*
+/**
* Metadata for setting create function
-*
-* @param array $params parameters as passed to the API
-*/
+ *
+ * @param array $params parameters as passed to the API
+ */
function _civicrm_api3_setting_get_spec(&$params) {
$params['domain_id'] = array(
'api.default' => 'current_domain',
);
}
-/*
+/**
* Metadata for setting create function
-*
-* @param array $params parameters as passed to the API
-*/
+ *
+ * @param array $params parameters as passed to the API
+ */
function _civicrm_api3_setting_getvalue_spec(&$params) {
$params['group'] = array(
'description' => 'if you do not pass in a domain id this will default to the current domain'
);
}
-/*
+
+/**
* Converts domain input into an array. If an array is passed in this is used, if 'all' is passed
* in this is converted to 'all arrays'
*