* @param bool $is_active
* Value we want to set the is_active field.
*
- * @return CRM_Core_DAO_Navigation|NULL
- * DAO object on success, NULL otherwise
+ * @return bool
+ * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_Navigation', $id, 'is_active', $is_active);
if (empty($params['id'])) {
$params['is_active'] = CRM_Utils_Array::value('is_active', $params, FALSE);
$params['has_separator'] = CRM_Utils_Array::value('has_separator', $params, FALSE);
+ $params['domain_id'] = CRM_Utils_Array::value('domain_id', $params, CRM_Core_Config::domainID());
}
if (!isset($params['id']) ||
$navigation->copyValues($params);
- $navigation->domain_id = CRM_Core_Config::domainID();
-
$navigation->save();
return $navigation;
}