Documentation

Utils
in package
uses AfformSaveTrait

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Methods

formatViewValue()  : string
getEntityWeights()  : array<string|int, string>
Sorts entities according to references to each other
getSearchOperators()  : array<string|int, mixed>
Subset of APIv4 operators that are appropriate for use on Afforms
initSourceTranslations()  : mixed
shouldClearMenuCache()  : bool
shouldReconcileManaged()  : bool
checkNameForAfform()  : void
saveTranslations()  : mixed
Save Translation Strings from Form to database array $form string $html
writeRecord()  : mixed

Methods

formatViewValue()

public static formatViewValue(string $fieldName, array<string|int, mixed> $fieldInfo, array<string|int, mixed> $values[, string|null $entityName = null ][, string|null $formName = null ]) : string
Parameters
$fieldName : string
$fieldInfo : array<string|int, mixed>
$values : array<string|int, mixed>
$entityName : string|null = null
$formName : string|null = null
Return values
string

getEntityWeights()

Sorts entities according to references to each other

public static getEntityWeights(mixed $formEntities, mixed $entityValues) : array<string|int, string>

Returns a list of entity names in order of when they should be processed, so that an entity being referenced is saved before the entity referencing it.

Parameters
$formEntities : mixed
$entityValues : mixed
Return values
array<string|int, string>

getSearchOperators()

Subset of APIv4 operators that are appropriate for use on Afforms

public static getSearchOperators() : array<string|int, mixed>

This list may be further reduced by fields which declare a limited number of operators in their metadata.

Return values
array<string|int, mixed>

initSourceTranslations()

public static initSourceTranslations() : mixed

shouldClearMenuCache()

public static shouldClearMenuCache(array<string|int, mixed> $updatedAfform[, array<string|int, mixed> $originalAfform = [] ]) : bool
Parameters
$updatedAfform : array<string|int, mixed>
$originalAfform : array<string|int, mixed> = []
Return values
bool

shouldReconcileManaged()

public static shouldReconcileManaged(array<string|int, mixed> $updatedAfform[, array<string|int, mixed> $originalAfform = [] ]) : bool
Parameters
$updatedAfform : array<string|int, mixed>
$originalAfform : array<string|int, mixed> = []
Return values
bool

saveTranslations()

Save Translation Strings from Form to database array $form string $html

protected static saveTranslations(mixed $form, mixed $html) : mixed
Parameters
$form : mixed
$html : mixed

writeRecord()

protected writeRecord(mixed $item) : mixed
Parameters
$item : mixed

        
On this page

Search results