FieldInterface
interface FieldInterface
Interface FieldInterface
Methods
Adds special values to saved properties.
Alters the search table row value at the 'advanced search' page.
Format status-properties which have been set as template markers.
Get additional fields in form definition language
No description
Transform field into form definition language
Get property search query part to make the property searchable
Before the properties are displayed, some fields need to prepare their values or other information, which will be covered here.
Extracts the config from the corresponding fields and evaluates the field value.
Processes the submitted value after a users profile has been saved.
Brings the user input into proper shape after entering them in the advanced search form.
Details
at line 131
static void
addSpecialValues(array $row, array $config)
Adds special values to saved properties.
Mainly used for SystemUser, SystemUserMeta, SystemUserGroup and SystemHierarchy.
at line 104
static string
decorateSearchTableValue(xm_lookbook $mod, array $row, array $profiles, array $propertyConfig, array $userMeta)
Alters the search table row value at the 'advanced search' page.
It is important to return the value that will be displayed in the table, because they will be added to the profiles eventually. The reference to the profiles array allows direct changes.
at line 53
static array|null
formatProperty(array $property, array $config)
Format status-properties which have been set as template markers.
at line 43
static array
getAdditionalEditFDL(array $field, array $fdl)
Get additional fields in form definition language
at line 19
static array
getConfigFields()
No description
at line 33
static array
getEditFDL(Controller $mod, array $field, Form $form, int $profileId, int $copyId, array $config)
Transform field into form definition language
at line 64
static string
getPropertySearchQuery(string $searchWord, array $alternatives, xm_lookbook_property $property)
Get property search query part to make the property searchable
at line 144
static void
preparePropertyDisplay(xm_lookbook $mod, xm_lookbook_profile $profile, array $property, array $config)
Before the properties are displayed, some fields need to prepare their values or other information, which will be covered here.
Therefor, these values are manipulated before set as template marker, thus before the formatProperty method.
at line 78
static string|null
processConfigVariables(int $profileId, int $propertyId, string $fieldValue, int $copy, array $propertyConfig, string $profilePropertyConfig)
Extracts the config from the corresponding fields and evaluates the field value.
at line 122
static bool
processSubmittedValue(xm_lookbook $mod, int $profileId, string $submittedValue, array $field, string $fieldName, int $copy, array $config, array $fieldErrors, array $propertyValues)
Processes the submitted value after a users profile has been saved.
Each field needs its own execution routine and write the value directly into $submittedValue, as there is no uniform return type.
at line 89
static void
shapeFieldSearchParams(array $fieldInput, string $fieldName, array $searchParams)
Brings the user input into proper shape after entering them in the advanced search form.
Some fields may carry arrays and some may carry JSON strings which need to formed so the search params are compatible with existing functions.