CRM_Core_OptionGroup
class CRM_Core_OptionGroup
Properties
static | $_values | ||
static | $_cache | ||
static | $_domainIDGroups | $_domainIDGroups array maintains the list of option groups for whom domainID is to be considered. |
Methods
No description
This function retrieves all the values for the specific option group by name this is primarily used to create various html based form elements (radio, select, checkbox etc). OptionGroups for most cases have the 'label' in the label column and the 'id' or 'name' in the value column
Counterpart to values() which removes the item from the cache
No description
This function retrieves all the values for the specific option group by id.
Lookup titles OR ids for a set of option_value populated fields. The retrieved value is assigned a new field name by id or id's by title (each within a specified option_group).
No description
Get option_value.value from default option_value row for an option group
Creates a new option group with the passed in values.
No description
No description
No description
Wrapper for calling values with fresh set to true to empty the given value.
No description
Details
at line 55
static array
valuesCommon(CRM_Core_DAO $dao, bool $flip = FALSE, bool $grouping = FALSE, bool $localize = FALSE, string $valueColumnName = 'label')
at line 117
static array
values(string $name, bool $flip = FALSE, bool $grouping = FALSE, bool $localize = FALSE, string $condition = NULL, string $labelColumnName = 'label', bool $onlyActive = TRUE, bool $fresh = FALSE, string $keyColumnName = 'value', string $orderBy = 'weight')
This function retrieves all the values for the specific option group by name this is primarily used to create various html based form elements (radio, select, checkbox etc). OptionGroups for most cases have the 'label' in the label column and the 'id' or 'name' in the value column
at line 193
static protected
flushValues(string $name, $flip, $grouping, $localize, $condition, string $labelColumnName, $onlyActive, string $keyColumnName = 'value')
Counterpart to values() which removes the item from the cache
at line 203
static protected string
createCacheKey()
at line 232
static array
valuesByID(int $id, bool $flip = FALSE, bool $grouping = FALSE, bool $localize = FALSE, string $labelColumnName = 'label', bool $onlyActive = TRUE, bool $fresh = FALSE)
This function retrieves all the values for the specific option group by id.
this is primarily used to create various html based form elements (radio, select, checkbox etc). OptionGroups for most cases have the 'label' in the label column and the 'id' or 'name' in the value column
at line 283
static
lookupValues(array $params, array $names, bool $flip = FALSE)
Lookup titles OR ids for a set of option_value populated fields. The retrieved value is assigned a new field name by id or id's by title (each within a specified option_group).
at line 344
static null
getLabel(string $groupName, $value, bool $onlyActiveValue = TRUE)
deprecated
deprecated
at line 388
static null
getValue(string $groupName, $label, string $labelField = 'label', string $labelType = 'String', string $valueField = 'value')
deprecated
deprecated
at line 435
static string
getDefaultValue(string $groupName)
Get option_value.value from default option_value row for an option group
at line 483
static int
createAssoc(string $groupName, array $values, int $defaultID, null $groupTitle = NULL)
Creates a new option group with the passed in values.
at line 523
static
getAssoc(string $groupName, $values, bool $flip = FALSE, string $field = 'name')
at line 567
static
deleteAssoc(string $groupName, string $operator = "=")
at line 591
static array
getRowValues(string $groupName, $fieldValue, string $field = 'name', string $fieldType = 'String', bool $active = TRUE, bool $localize = FALSE)
at line 647
static
flush(string $name, array $params = array())
Wrapper for calling values with fresh set to true to empty the given value.
Since there appears to be some inconsistency (@todo remove inconsistency) around the pseudoconstant operations (for example CRM_Contribution_Pseudoconstant::paymentInstrument doesn't specify isActive which is part of the cache key will do a couple of variations & aspire to someone cleaning it up later