ActionObjectProvider
extends AutoService
in package
implements
EventSubscriberInterface, ProviderInterface
Accept $apiRequests based on \Civi\API\Action
Tags
Table of Contents
Interfaces
- EventSubscriberInterface
- ProviderInterface
- An API "provider" provides a means to execute API requests.
Methods
- fillEntityDefaults() : mixed
- getActionNames() : array<string|int, mixed>
- getEntities() : mixed
- Get all APIv4 entities
- getEntityNames() : array<string|int, mixed>
- getSubscribedEvents() : array<string|int, mixed>
- invoke() : Result
- onApiResolve() : mixed
- handleChains() : mixed
- Run each chained action once per row
- resolveChainLinks() : mixed
- Swap out variable names
- runChain() : array<string|int, mixed>|Result|null
- Run a chained action
- getResultClass() : string
Methods
fillEntityDefaults()
public
fillEntityDefaults(array<string|int, mixed> &$entities) : mixed
Parameters
- $entities : array<string|int, mixed>
getActionNames()
public
getActionNames(int $version, string $entity) : array<string|int, mixed>
Parameters
- $version : int
- $entity : string
Tags
Return values
array<string|int, mixed>getEntities()
Get all APIv4 entities
public
getEntities() : mixed
getEntityNames()
public
getEntityNames(int $version) : array<string|int, mixed>
Parameters
- $version : int
Tags
Return values
array<string|int, mixed>getSubscribedEvents()
public
static getSubscribedEvents() : array<string|int, mixed>
Return values
array<string|int, mixed>invoke()
public
invoke(AbstractAction $action) : Result
Parameters
- $action : AbstractAction
Tags
Return values
ResultonApiResolve()
public
onApiResolve(ResolveEvent $event) : mixed
Parameters
- $event : ResolveEvent
-
API resolution event.
handleChains()
Run each chained action once per row
protected
handleChains(AbstractAction $action, Result $result) : mixed
Parameters
- $action : AbstractAction
- $result : Result
resolveChainLinks()
Swap out variable names
protected
resolveChainLinks(mixed &$val, array<string|int, mixed> $result) : mixed
Parameters
- $val : mixed
- $result : array<string|int, mixed>
runChain()
Run a chained action
protected
runChain(mixed $request, mixed $row) : array<string|int, mixed>|Result|null
Parameters
- $request : mixed
- $row : mixed
Tags
Return values
array<string|int, mixed>|Result|nullgetResultClass()
private
getResultClass(mixed $action) : string
Parameters
- $action : mixed