* @param bool $is_active
* Value we want to set the is_active field.
*
- * @return Object
- * 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) {
$this->find(TRUE);
}
+ // This will hold the list of options in format key => label
+ $options = [];
+
if (!empty($this->option_group_id)) {
$options = CRM_Core_OptionGroup::valuesByID(
$this->option_group_id,
elseif ($this->data_type === 'Boolean') {
$options = $context == 'validate' ? array(0, 1) : CRM_Core_SelectValues::boolean();
}
- else {
- return FALSE;
- }
CRM_Utils_Hook::customFieldOptions($this->id, $options, FALSE);
CRM_Utils_Hook::fieldOptions($this->getEntity(), "custom_{$this->id}", $options, array('context' => $context));
return $options;