CRM_Contribute_PseudoConstant
class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant
This class holds all the Pseudo constants that are specific to Contributions.
This avoids polluting the core class and isolates the mass mailer class.
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.
No description
Get all the valid accepted credit cards.
Get all premiums.
Get all the contribution statuses.
Get all the Personal campaign pages.
Get all PCP Statuses.
Get financial account for a Financial type.
Get all batches.
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 181
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 110
static array
financialType(int $id = NULL, bool $includeDisabled = FALSE)
deprecated
deprecated
at line 148
static array
financialAccount(int $id = NULL, int $financialAccountTypeId = NULL, string $retrieveColumn = 'name', string $key = 'id')
deprecated
deprecated
at line 201
static array
contributionPage(int $id = NULL, bool $all = FALSE)
deprecated
deprecated
at line 233
static array
paymentInstrument(string $columnName = 'label')
deprecated
deprecated
at line 250
static array
creditCard()
Get all the valid accepted credit cards.
at line 262
static array
products(int $pageID = NULL)
Get all premiums.
at line 310
static array
contributionStatus(int $id = NULL, string $columnName = 'label')
Get all the contribution statuses.
at line 335
static array
pcPage(null $pageType = NULL, int $id = NULL)
Get all the Personal campaign pages.
at line 366
static array
pcpStatus(string $column = 'label')
Get all PCP Statuses.
The static array pcpStatus is returned
at line 392
static int
getRelationalFinancialAccount(int $entityId, string $accountRelationType, string $entityTable = 'civicrm_financial_type', string $returnField = 'financial_account_id')
deprecated
deprecated
Get financial account for a Financial type.
at line 416
static array
batch(int $id = NULL)
Get all batches.