Documentation

AfformMetadataInjector
in package

Table of Contents

Methods

preprocess()  : mixed
setFieldMetadata()  : void
Merge a field's definition with whatever's already in the markup
fillFieldMetadata()  : void
Merge field definition metadata into an afform field's definition
getFieldEntityType()  : string|array<string|int, mixed>
Determines name of the api entit(ies) based on the field name prefix
getFieldMetadata()  : array<string|int, mixed>|null
getFormEntities()  : mixed

Methods

setFieldMetadata()

Merge a field's definition with whatever's already in the markup

public static setFieldMetadata(DOMElement $afField, array<string|int, mixed> $fieldInfo) : void
Parameters
$afField : DOMElement
$fieldInfo : array<string|int, mixed>
Tags
throws
CRM_Core_Exception
throws
NotImplementedException

fillFieldMetadata()

Merge field definition metadata into an afform field's definition

private static fillFieldMetadata(string|array<string|int, mixed> $entityNames, string $action, DOMElement $afField) : void
Parameters
$entityNames : string|array<string|int, mixed>
$action : string
$afField : DOMElement
Tags
throws
CRM_Core_Exception

getFieldEntityType()

Determines name of the api entit(ies) based on the field name prefix

private static getFieldEntityType(string $fieldName, array<string|int, string> $entityList) : string|array<string|int, mixed>

Note: Normally will return a single entity name, but Will return 2 entity names in the case of Bridge joins e.g. RelationshipCache

Parameters
$fieldName : string
$entityList : array<string|int, string>
Return values
string|array<string|int, mixed>

getFieldMetadata()

private static getFieldMetadata(mixed $entityNames, string $action, string $fieldName) : array<string|int, mixed>|null
Parameters
$entityNames : mixed
$action : string
$fieldName : string
Return values
array<string|int, mixed>|null

getFormEntities()

private static getFormEntities(phpQueryObject $doc) : mixed
Parameters
$doc : phpQueryObject

        
On this page

Search results