CRM_Core_ManagedEntities
class CRM_Core_ManagedEntities
The ManagedEntities system allows modules to add records to the database declaratively. Those records will be automatically inserted, updated, deactivated, and deleted in tandem with their modules.
Properties
protected array | $moduleIndex | ||
protected array | $declarations |
Methods
Get clean up options.
Get an instance.
Perform an asynchronous reconciliation when the transaction ends.
No description
Read a managed entity using APIv3.
Identify any enabled/disabled modules. Add new entities, update existing entities, and remove orphaned (stale) entities.
For all enabled modules, add new entities, update existing entities, and remove orphaned (stale) entities.
For one enabled module, add new entities, update existing entities, and remove orphaned (stale) entities.
For all disabled modules, disable any managed entities.
Remove any orphaned (stale) entities that are linked to unknown modules.
Create a new entity.
Update an entity which (a) is believed to exist and which (b) ought to be active.
Update an entity which (a) is believed to exist and which (b) ought to be inactive.
Get declarations.
No description
No description
No description
No description
No description
Details
at line 15
static array
getCleanupOptions()
Get clean up options.
at line 41
static CRM_Core_ManagedEntities
singleton(bool $fresh = FALSE)
Get an instance.
at line 52
static
scheduleReconciliation()
Perform an asynchronous reconciliation when the transaction ends.
at line 69
__construct(array $modules, array $declarations)
at line 90
array|NULL
get(string $moduleName, string $name)
Read a managed entity using APIv3.
at line 118
reconcile()
Identify any enabled/disabled modules. Add new entities, update existing entities, and remove orphaned (stale) entities.
at line 133
reconcileEnabledModules()
For all enabled modules, add new entities, update existing entities, and remove orphaned (stale) entities.
at line 161
reconcileEnabledModule(CRM_Core_Module $module, array $todos)
For one enabled module, add new entities, update existing entities, and remove orphaned (stale) entities.
at line 186
reconcileDisabledModules()
For all disabled modules, disable any managed entities.
at line 206
reconcileUnknownModules()
Remove any orphaned (stale) entities that are linked to unknown modules.
at line 233
insertNewEntity(array $todo)
Create a new entity.
at line 255
updateExistingEntity(CRM_Core_DAO_Managed $dao, array $todo)
Update an entity which (a) is believed to exist and which (b) ought to be active.
at line 284
disableEntity(CRM_Core_DAO_Managed $dao)
Update an entity which (a) is believed to exist and which (b) ought to be inactive.
at line 306
removeStaleEntity(CRM_Core_DAO_Managed $dao)
Remove a stale entity (if policy allows).
at line 358
array|null
getDeclarations()
Get declarations.