/**
* Store an item in the setting table.
*
- * _setItem() is the common logic shared by setItem() and setItems().
- *
- * @param object $value
+ * @param $value
* (required) The value that will be serialized and stored.
* @param string $group
* The group name of the item (deprecated).
* An optional ID to assign the creator to. If not set, retrieved from session.
*
* @param int $domainID
+ *
+ * @throws \CRM_Core_Exception
+ *
+ * @deprecated - refer docs https://docs.civicrm.org/dev/en/latest/framework/setting/
*/
public static function setItem(
$value,
$createdID = NULL,
$domainID = NULL
) {
+ CRM_Core_Error::deprecatedFunctionWarning('refer docs for correct methods https://docs.civicrm.org/dev/en/latest/framework/setting/');
+
/** @var \Civi\Core\SettingsManager $manager */
$manager = \Civi::service('settings_manager');
$settings = ($contactID === NULL) ? $manager->getBagByDomain($domainID) : $manager->getBagByContact($domainID, $contactID);
* 'config_key' = the config key is different to the settings key - e.g. debug where there was a conflict
* 'legacy_key' = rename from config or setting with this name
*
- * _setItem() is the common logic shared by setItem() and setItems().
- *
* @param array $params
* (required) An api formatted array of keys and values.
* @param null $domains
* @param bool $system
* @param int $userID
* @param string $keyField
+ *
+ * @throws \CRM_Core_Exception
+ *
+ * @deprecated
*/
public static function setValueOption(
$group,
$userID = NULL,
$keyField = 'name'
) {
+ CRM_Core_Error::deprecatedFunctionWarning('refer docs for correct methods https://docs.civicrm.org/dev/en/latest/framework/setting/');
if (empty($value)) {
$optionValue = NULL;
}