interface FieldInterface

Interface FieldInterface

Methods

static void
addSpecialValues(array $row, array $config)

Adds special values to saved properties.

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.

static array|null
formatProperty(array $property, array $config)

Format status-properties which have been set as template markers.

static array
getAdditionalEditFDL(array $field, array $fdl)

Get additional fields in form definition language

static array
getConfigFields()

No description

static array
getEditFDL(Controller $mod, array $field, Form $form, int $profileId, int $copyId, array $config)

Transform field into form definition language

static string
getPropertySearchQuery(string $searchWord, array $alternatives, xm_lookbook_property $property)

Get property search query part to make the property searchable

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.

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.

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.

static void
shapeFieldSearchParams(array $fieldInput, string $fieldName, array $searchParams)

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.

Parameters

array $row
array $config

Return Value

void

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.

Parameters

xm_lookbook $mod
array $row
array $profiles
array $propertyConfig
array $userMeta

Return Value

string

at line 53
static array|null formatProperty(array $property, array $config)

Format status-properties which have been set as template markers.

Parameters

array $property
array $config

Return Value

array|null

at line 43
static array getAdditionalEditFDL(array $field, array $fdl)

Get additional fields in form definition language

Parameters

array $field
array $fdl

Return Value

array

One or more additional fields

at line 19
static array getConfigFields()

No description

Return Value

array

at line 33
static array getEditFDL(Controller $mod, array $field, Form $form, int $profileId, int $copyId, array $config)

Transform field into form definition language

Parameters

Controller $mod
array $field
Form $form
int $profileId
int $copyId
array $config

Return Value

array

A single field

at line 64
static string getPropertySearchQuery(string $searchWord, array $alternatives, xm_lookbook_property $property)

Get property search query part to make the property searchable

Parameters

string $searchWord
array $alternatives
xm_lookbook_property $property

Return Value

string

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.

Parameters

xm_lookbook $mod
xm_lookbook_profile $profile
array $property
array $config

Return Value

void

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.

Parameters

int $profileId
int $propertyId
string $fieldValue
int $copy
array $propertyConfig
string $profilePropertyConfig

Return Value

string|null

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.

Parameters

xm_lookbook $mod
int $profileId
string $submittedValue
array $field
string $fieldName
int $copy
array $config
array $fieldErrors
array $propertyValues

Return Value

bool

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.

Parameters

array $fieldInput
string $fieldName
array $searchParams

Return Value

void