CRM_Core_DAO_AllCoreTables
in package
Tags
Table of Contents
Methods
- convertEntityNameToCamel() : string
- Convert possibly underscore separated words to camel case with special handling for 'UF' e.g membership_payment returns MembershipPayment
- convertEntityNameToLower() : string
- Convert CamelCase to snake_case, with special handling for some entity names.
- daoToClass() : array<string|int, string>
- Mapping from entity-names to class-names.
- flush() : void
- Flush class cache.
- get() : mixed
- getBaoClasses() : array<string|int, string>
- Get a list of all extant BAO classes, keyed by entityName.
- getBAOClassName() : string|CRM_Core_DAO
- Get the BAO for a DAO class.
- getBriefName() : string|null
- getCanonicalClassName() : string
- Get the DAO for a BAO class.
- getClasses() : array<string|int, mixed>
- Get a list of all DAO classes.
- getClassForTable() : string|CRM_Core_DAO|null
- Get the classname for the table.
- getCoreTables() : mixed
- getDAONameForEntity() : string|CRM_Core_DAO|null
- Given an entity name, determine the DAO class-name.
- getEntities() : array<string|int, array<string|int, mixed>>
- getEntityNameForClass() : string|null
- Given a DAO or BAO class-name, return the entity name.
- getEntityNameForTable() : false|string
- Convert table name to entity name.
- getFullName() : mixed
- getTableForClass() : string|false
- getTableForEntityName() : string
- Convert the entity name into a table name.
- indices() : array<string|int, mixed>
- init() : void
- isCoreTable() : bool
- Determine whether $tableName is a core table.
- multilingualize() : array<string|int, mixed>
- Modify indices to account for localization options.
- reinitializeCache() : void
- tables() : array<string|int, string>
- Mapping from table-names to class-names.
- tokenClasses() : array<string|int, string>
- Get the declared token classes.
- getEntitiesByClass() : array<string|int, string>
- This one is problematic because it's not strictly required to have one class per table. It's possible for multiple tables to share a class.
- getEntitiesByTable() : array<string|int, string>
Methods
convertEntityNameToCamel()
Convert possibly underscore separated words to camel case with special handling for 'UF' e.g membership_payment returns MembershipPayment
public
static convertEntityNameToCamel(string $name[, bool $legacyV3 = FALSE ]) : string
Parameters
- $name : string
- $legacyV3 : bool = FALSE
Return values
stringconvertEntityNameToLower()
Convert CamelCase to snake_case, with special handling for some entity names.
public
static convertEntityNameToLower(string $name) : string
Eg. Activity returns activity UFGroup returns uf_group OptionValue returns option_value
Parameters
- $name : string
Return values
stringdaoToClass()
Mapping from entity-names to class-names.
public
static daoToClass() : array<string|int, string>
Return values
array<string|int, string> —[EntityName => CRM_DAO_ClassName]
flush()
Flush class cache.
public
static flush() : void
get()
public
static get() : mixed
in 5.72 will be removed in 5.90.
getBaoClasses()
Get a list of all extant BAO classes, keyed by entityName.
public
static getBaoClasses() : array<string|int, string>
Return values
array<string|int, string> —[EntityName => CRM_BAO_ClassName]
getBAOClassName()
Get the BAO for a DAO class.
public
static getBAOClassName(string $daoName) : string|CRM_Core_DAO
Parameters
- $daoName : string
Return values
string|CRM_Core_DAOgetBriefName()
public
static getBriefName(mixed $className) : string|null
in 5.72 will be removed in 5.102
Parameters
- $className : mixed
Return values
string|nullgetCanonicalClassName()
Get the DAO for a BAO class.
public
static getCanonicalClassName(string $className) : string
Parameters
- $className : string
Return values
stringgetClasses()
Get a list of all DAO classes.
public
static getClasses() : array<string|int, mixed>
Return values
array<string|int, mixed> —List of class names.
getClassForTable()
Get the classname for the table.
public
static getClassForTable(string $tableName) : string|CRM_Core_DAO|null
Parameters
- $tableName : string
Return values
string|CRM_Core_DAO|nullgetCoreTables()
public
static getCoreTables() : mixed
in 5.72 will be removed in 5.90
getDAONameForEntity()
Given an entity name, determine the DAO class-name.
public
static getDAONameForEntity(string|null $entityName) : string|CRM_Core_DAO|null
Parameters
- $entityName : string|null
-
Ex: 'Contact'.
Return values
string|CRM_Core_DAO|null —Ex: 'CRM_Contact_DAO_Contact'.
getEntities()
public
static getEntities() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>> —[EntityName => [table => table_name, class => CRM_DAO_ClassName]][]
getEntityNameForClass()
Given a DAO or BAO class-name, return the entity name.
public
static getEntityNameForClass(string|null $className) : string|null
Parameters
- $className : string|null
-
Ex: 'CRM_Contact_DAO_Contact'.
Return values
string|null —Ex: 'Contact'.
getEntityNameForTable()
Convert table name to entity name.
public
static getEntityNameForTable(string $tableName) : false|string
Parameters
- $tableName : string
Return values
false|stringgetFullName()
public
static getFullName(mixed $entityName) : mixed
in 5.72 will be removed in 5.96
Parameters
- $entityName : mixed
getTableForClass()
public
static getTableForClass(string $className) : string|false
Parameters
- $className : string
-
DAO or BAO name
Return values
string|false —SQL table name
getTableForEntityName()
Convert the entity name into a table name.
public
static getTableForEntityName(string $entityName) : string
Parameters
- $entityName : string
-
e.g. 'Activity'
Return values
string —e.g. 'civicrm_activity'
indices()
public
static indices([mixed $localize = TRUE ]) : array<string|int, mixed>
Parameters
- $localize : mixed = TRUE
Return values
array<string|int, mixed> —List of indices.
init()
public
static init([bool $fresh = FALSE ]) : void
in 5.73 will be removed in 5.90
Parameters
- $fresh : bool = FALSE
-
Deprecated parameter, use flush() to flush.
isCoreTable()
Determine whether $tableName is a core table.
public
static isCoreTable(string $tableName) : bool
Parameters
- $tableName : string
Return values
boolmultilingualize()
Modify indices to account for localization options.
public
static multilingualize(string $class, array<string|int, mixed> $originalIndices) : array<string|int, mixed>
Parameters
- $class : string
-
DAO class
- $originalIndices : array<string|int, mixed>
-
index definitions before localization
Return values
array<string|int, mixed> —index definitions after localization
reinitializeCache()
public
static reinitializeCache() : void
in 5.54 will be removed in 5.85
tables()
Mapping from table-names to class-names.
public
static tables() : array<string|int, string>
Return values
array<string|int, string> —[table_name => CRM_DAO_ClassName]
tokenClasses()
Get the declared token classes.
public
static tokenClasses() : array<string|int, string>
Return values
array<string|int, string> —[table_name => token class]
getEntitiesByClass()
This one is problematic because it's not strictly required to have one class per table. It's possible for multiple tables to share a class.
private
static getEntitiesByClass() : array<string|int, string>
Return values
array<string|int, string> —[CRM_DAO_ClassName => EntityName]
getEntitiesByTable()
private
static getEntitiesByTable() : array<string|int, string>
Return values
array<string|int, string> —[table_name => EntityName][]