ImportSubscriber
extends AutoService
in package
implements
EventSubscriberInterface
Listening class that registers each Import table as an entity.
Tags
Table of Contents
Interfaces
- EventSubscriberInterface
Methods
- getImportForms() : array<string|int, mixed>
- Get an array of FormBuilder forms for viewing imports.
- getSubscribedEvents() : array<string|int, string>
- Get the events this class listens to.
- on_civi_afform_get() : void
- Get an array of FormBuilder forms for viewing imports.
- on_civi_api4_entityTypes() : void
- Register each valid import as an entity
- on_hook_civicrm_post() : void
- Callback for hook_civicrm_post().
- on_hook_civicrm_pre() : void
- Callback for hook_civicrm_pre().
- on_schema_map_build() : void
- Register FK join from import table to entity being imported
- onApiAuthorize() : void
- flushEntityMetadata() : void
- Flush entities cache key so our new Import will load as an entity.
- ImportEntityExists() : int
- Does the pseudo-entity for the import exist yet.
- getImportTableFromEvent() : string|null
- Get the import table from event data.
- isTableChange() : bool
- Is the update changing the associated temp table.
Methods
getImportForms()
Get an array of FormBuilder forms for viewing imports.
public
static getImportForms() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getSubscribedEvents()
Get the events this class listens to.
public
static getSubscribedEvents() : array<string|int, string>
Return values
array<string|int, string>on_civi_afform_get()
Get an array of FormBuilder forms for viewing imports.
public
static on_civi_afform_get(GenericHookEvent $event) : void
Parameters
- $event : GenericHookEvent
Tags
on_civi_api4_entityTypes()
Register each valid import as an entity
public
static on_civi_api4_entityTypes(GenericHookEvent $event) : void
Parameters
- $event : GenericHookEvent
Tags
on_hook_civicrm_post()
Callback for hook_civicrm_post().
public
on_hook_civicrm_post(PostEvent $event) : void
Parameters
- $event : PostEvent
on_hook_civicrm_pre()
Callback for hook_civicrm_pre().
public
on_hook_civicrm_pre(PreEvent $event) : void
Parameters
- $event : PreEvent
Tags
on_schema_map_build()
Register FK join from import table to entity being imported
public
static on_schema_map_build(SchemaMapBuildEvent $event) : void
Parameters
- $event : SchemaMapBuildEvent
onApiAuthorize()
public
onApiAuthorize(AuthorizeEvent $event) : void
Parameters
- $event : AuthorizeEvent
-
API authorization event.
Tags
flushEntityMetadata()
Flush entities cache key so our new Import will load as an entity.
protected
flushEntityMetadata() : void
ImportEntityExists()
Does the pseudo-entity for the import exist yet.
protected
ImportEntityExists(PostEvent $event) : int
Parameters
- $event : PostEvent
Tags
Return values
intgetImportTableFromEvent()
Get the import table from event data.
private
getImportTableFromEvent(GenericHookEvent $event) : string|null
Parameters
- $event : GenericHookEvent
Return values
string|nullisTableChange()
Is the update changing the associated temp table.
private
isTableChange(GenericHookEvent $event) : bool
Parameters
- $event : GenericHookEvent