CRM_Event_PseudoConstant
class CRM_Event_PseudoConstant extends CRM_Core_PseudoConstant
This class holds all the Pseudo constants that are specific to Event. This avoids polluting the core class and isolates the Event
Methods
Low-level option getter, rarely accessed directly.
Fetch the translated label for a field given its key.
Fetch the machine name for a field given its key.
Fetch the key for a field option given its name.
Lookup the admin page at which a field's option list can be edited
No description
Flush given pseudoconstant so it can be reread from db nex time it's requested.
Get all the State/Province from database.
Get all the State/Province abbreviations from the database.
Get all the State/Province abbreviations from the database for the specified country.
Get all the State/Province abbreviations from the database for the default country.
Get all the countries from database.
Get all the country ISO Code abbreviations from the database.
Get all permissioned groups from database.
Fetch groups in a nested format suitable for use in select form element.
Get all permissioned groups from database.
Get all Relationship Types from database.
Get all the County from database.
No description
No description
Get all the World Regions from Database.
No description
Given a state ID return the country ID, this allows us to populate forms and values for downstream code
Get all types of Greetings.
Get all options values.
Fetch the list of active extensions of type 'module'
Get participant status class options.
Get all the n events
Get all the n participant statuses.
Get participant status class options.
Return a status-type-keyed array of status classes
Get all the n participant roles.
Get all the participant listings.
Get all event types.
Get event template titles.
Get all the Personal campaign pages.
Details
in CRM_Core_PseudoConstant at line 198
static array|bool
get(string $daoName, string $fieldName, array $params = [], string $context = NULL)
Low-level option getter, rarely accessed directly.
NOTE: Rather than calling this function directly use CRM__BAO_::buildOptions()
in CRM_Core_PseudoConstant at line 411
static bool|null|string
getLabel(string $baoName, string $fieldName, string|int $key)
Fetch the translated label for a field given its key.
in CRM_Core_PseudoConstant at line 431
static bool|null|string
getName(string $baoName, string $fieldName, string|int $key)
Fetch the machine name for a field given its key.
in CRM_Core_PseudoConstant at line 451
static bool|null|string|int
getKey(string $baoName, string $fieldName, string|int $value)
Fetch the key for a field option given its name.
in CRM_Core_PseudoConstant at line 464
static string|null
getOptionEditUrl($fieldSpec)
Lookup the admin page at which a field's option list can be edited
in CRM_Core_PseudoConstant at line 514
static array
populate(array $var, string $name, bool $all = FALSE, string $retrieve = 'name', string $filter = 'is_active', string $condition = NULL, bool $orderby = NULL, string $key = 'id', bool $force = NULL)
deprecated
deprecated
at line 295
static
flush(bool|string $name = 'cache')
Flush given pseudoconstant so it can be reread from db nex time it's requested.
in CRM_Core_PseudoConstant at line 594
static array
activityType()
deprecated
deprecated
in CRM_Core_PseudoConstant at line 672
static array
stateProvince(bool|int $id = FALSE, bool $limit = TRUE)
Get all the State/Province from database.
The static array stateProvince is returned, and if it's called the first time, the State Province DAO is used to get all the States.
Note: any database errors will be trapped by the DAO.
in CRM_Core_PseudoConstant at line 726
static array
stateProvinceAbbreviation(bool|int $id = FALSE, bool $limit = TRUE)
Get all the State/Province abbreviations from the database.
Same as above, except gets the abbreviations instead of the names.
in CRM_Core_PseudoConstant at line 774
static array
stateProvinceAbbreviationForCountry(int $countryID)
Get all the State/Province abbreviations from the database for the specified country.
in CRM_Core_PseudoConstant at line 788
static array
stateProvinceAbbreviationForDefaultCountry()
Get all the State/Province abbreviations from the database for the default country.
in CRM_Core_PseudoConstant at line 809
static array|null
country(bool|int $id = FALSE, bool $applyLimit = TRUE)
Get all the countries from database.
The static array country is returned, and if it's called the first time, the Country DAO is used to get all the countries.
Note: any database errors will be trapped by the DAO.
in CRM_Core_PseudoConstant at line 884
static array
countryIsoCode(bool $id = FALSE)
Get all the country ISO Code abbreviations from the database.
The static array countryIsoCode is returned, and if it's called the first time, the Country DAO is used to get all the countries' ISO codes.
Note: any database errors will be trapped by the DAO.
in CRM_Core_PseudoConstant at line 919
static array
allGroup(string $groupType = NULL, bool $excludeHidden = TRUE)
deprecated
deprecated
in CRM_Core_PseudoConstant at line 952
static array
group(string $groupType = NULL, bool $excludeHidden = TRUE)
Get all permissioned groups from database.
The static array group is returned, and if it's called the first time, the Group DAO is used to get all the groups.
Note: any database errors will be trapped by the DAO.
in CRM_Core_PseudoConstant at line 963
static array
nestedGroup(bool $checkPermissions = TRUE, string|null $groupType = NULL, bool $excludeHidden = TRUE)
Fetch groups in a nested format suitable for use in select form element.
in CRM_Core_PseudoConstant at line 985
static array
staticGroup(bool $onlyPublic = FALSE, null $groupType = NULL, bool $excludeHidden = TRUE)
Get all permissioned groups from database.
The static array group is returned, and if it's called the first time, the Group DAO is used to get all the groups.
Note: any database errors will be trapped by the DAO.
in CRM_Core_PseudoConstant at line 1025
static array
relationshipType(string $valueColumnName = 'label', bool $reset = FALSE, bool $isActive = 1)
Get all Relationship Types from database.
The static array group is returned, and if it's called the first time, the RelationshipType DAO is used to get all the relationship types.
Note: any database errors will be trapped by the DAO.
in CRM_Core_PseudoConstant at line 1067
static array
currencyCode()
Get all the ISO 4217 currency codes
so far, we use this for validation only, so there's no point of putting this into the database
in CRM_Core_PseudoConstant at line 1095
static array
county(bool|int $id = FALSE)
Get all the County from database.
The static array county is returned, and if it's called the first time, the County DAO is used to get all the Counties.
Note: any database errors will be trapped by the DAO.
in CRM_Core_PseudoConstant at line 1130
static array
paymentProcessor(bool $all = FALSE, bool $test = FALSE, null $additionalCond = NULL)
deprecated
deprecated
in CRM_Core_PseudoConstant at line 1165
static array
paymentProcessorType(bool $all = FALSE, int $id = NULL, string $return = 'title')
deprecated
deprecated
in CRM_Core_PseudoConstant at line 1185
static array
worldRegion(bool $id = FALSE)
Get all the World Regions from Database.
in CRM_Core_PseudoConstant at line 1215
static array
activityStatus(string $column = 'label')
deprecated
deprecated
in CRM_Core_PseudoConstant at line 1241
static array
visibility(string $column = 'label')
deprecated
deprecated
in CRM_Core_PseudoConstant at line 1259
static array
stateProvinceForCountry(int $countryID, string $field = 'name')
in CRM_Core_PseudoConstant at line 1313
static array
countyForState(int $stateID)
in CRM_Core_PseudoConstant at line 1375
static int|null
countryIDForStateID(int $stateID)
Given a state ID return the country ID, this allows us to populate forms and values for downstream code
in CRM_Core_PseudoConstant at line 1404
static array
greeting($filter, string $columnName = 'label')
Get all types of Greetings.
The static array of greeting is returned
in CRM_Core_PseudoConstant at line 1455
static array
getExtensions()
Get all extensions.
The static array extensions
FIXME: This is called by civix but not by any core code. We should provide an API call which civix can use instead.
in CRM_Core_PseudoConstant at line 1491
static array
accountOptionValues(bool $optionGroupName, int $id = NULL, null $condition = NULL)
Get all options values.
The static array option values is returned
in CRM_Core_PseudoConstant at line 1512
static array
getModuleExtensions(bool $fresh = FALSE)
Fetch the list of active extensions of type 'module'
in CRM_Core_PseudoConstant at line 1524
static array
getTaxRates()
Get all tax rates.
The static array tax rates is returned
in CRM_Core_PseudoConstant at line 1568
static array
emailOnHoldOptions()
Get participant status class options.
at line 100
static array
event(int $id = NULL, bool $all = FALSE, null $condition = NULL)
Get all the n events
at line 137
static array
participantStatus(int $id = NULL, null $cond = NULL, string $retColumn = 'name')
Get all the n participant statuses.
at line 164
static array
participantStatusClassOptions()
Get participant status class options.
at line 179
static array
participantStatusClass()
Return a status-type-keyed array of status classes
at line 199
static array|string
participantRole(int $id = NULL, null $cond = NULL)
Get all the n participant roles.
at line 230
static array|string
participantListing(int $id = NULL)
Get all the participant listings.
at line 251
static array|string
eventType(int $id = NULL)
Get all event types.
at line 272
static array
eventTemplates(int $id = NULL)
Get event template titles.
at line 309
static array
pcPage(int $id = NULL)
Get all the Personal campaign pages.