StaticText
class StaticText extends Field
Constants
| TYPE |
|
| MAX_FILTERS |
|
Methods
Serves an OptionList with selectable values from this field. If null is returned, this field is not supposed to act as a filter (Textarea for example doesn't make a good filter - self explanatory).
No description
Honestly... a static text doesn't need to be shown in a table, as filter or somewhere else that is not the form.
Adds field specific properties to the table, like callbacks, replaces and/or column formats.
Every field, that makes use of this method, will implement the field property 'is_unique', setting the field unique.
Fills the placeholders needed for workflows.
No description
Helper method for pre-fetching the faceted filter items count, which ends up being more performant than letting the faceted filters calculate each item count in its own.
Gets a field from the faceted search.
Returns the label needed for the HTML generated email.
Returns the value needed for the HTML generated mail.
Can the field be used with multiple values? Returning value is used as argument for FormChoice->setIsMultiple({$resultGoesHere}).
Adds the check for this field whether it is selectable or not.
Modifies the form field fdl for custom fields in order to display them properly.
No description
A static text, which always contains the same (default) value, shouldn't be set as a filter.
Processes the information on saving the list item.
Replaces the placeholders with the values of their fields.
When list items will be created or updated through the webservice API, this gets interesting as this determines whether a field has predefined values (like select-, and checkbox-fields, as these contain 'pop_data[]').
Validates the resources and their bookings.
Details
in
Field at line 372
OptionList|null
addDefaultFilterValue(ListsController $mod, ListProperties $list, array $fieldFdl)
Serves an OptionList with selectable values from this field. If null is returned, this field is not supposed to act as a filter (Textarea for example doesn't make a good filter - self explanatory).
at line 80
void
addFieldToFaceted(ListItemCollection $listItemCollection, FacetedFilter $faceted, string $fieldId, array $fieldFdl, ListProperties $list, string $facetedFieldId, string $viewMode, bool $isDefaultFilterField = false, string|null $defaultFilterValue = null)
No description
at line 91
void
addFormEditorProperties(FormEditor $feditor, ListsController $mod, array $disabledFieldProperties)
Honestly... a static text doesn't need to be shown in a table, as filter or somewhere else that is not the form.
in
Field at line 57
bool
addTableFieldProperties(string $fieldId, array $fieldFdl, Table $table, array $columnFormat, array $sortableFields, array $groupFields)
Adds field specific properties to the table, like callbacks, replaces and/or column formats.
By using this method, be aware that 3 (three) parameters are used as reference in order to modify multiple values at once. Usually, a table callback would be enough to get this working. However, setting a column format is allowed too, as well as setting sortable fields and group fields (if grouping is enabled by the fields). Although this uses reference parameters, the return type is boolean, since the value is used to make sure that this field really is displayed. Whenever this method returns FALSE, the field will be skipped and doesn't appear in the table.
in
Field at line 318
protected void
addUniqueProperty(FormEditor $formEditor, ListsController $mod)
Every field, that makes use of this method, will implement the field property 'is_unique', setting the field unique.
in
Field at line 109
void
addWorkflowPlaceholders(ListsController $mod, array $fieldFdl, ListItem|null $listItem, array $placeholders, bool $descriptive)
Fills the placeholders needed for workflows.
at line 100
void
formatValueForDisplay(array $fieldFdl, $fieldValue)
No description
in
Field at line 241
protected array
getAnswersWithCounts(ListItemCollection $listItemCollection, string $facetedFieldId, array $conditions)
Helper method for pre-fetching the faceted filter items count, which ends up being more performant than letting the faceted filters calculate each item count in its own.
in
Field at line 286
void
getFacetedField(string $fieldId, array $facetedFields, int $counter, bool $ignoreLimit, bool $returnStatus)
Gets a field from the faceted search.
in
Field at line 144
string
getHTMLLabel(array $fdl, string $fieldId)
Returns the label needed for the HTML generated email.
at line 34
string|null
getHTMLValue(array $fdl, string $key, $data)
Returns the value needed for the HTML generated mail.
in
Field at line 387
bool
isMultipleDefaultFilter()
Can the field be used with multiple values? Returning value is used as argument for FormChoice->setIsMultiple({$resultGoesHere}).
at line 21
bool
isSelectable()
Adds the check for this field whether it is selectable or not.
in
Field at line 75
void
modifyFormFieldFdl(ListProperties $list, array $fieldFdl, string $showOnly, array $finishedFdl = [], bool $overwritable = false)
Modifies the form field fdl for custom fields in order to display them properly.
It's important to know, that the field fdl AND the finished fdl are passed as reference parameters, which enables the method to modify both the current field fdl (is some information about the field may change) and the finished fdl (what will be added to the form after all - what might end in additional fields like those created by resource fields - _count - or by the timespan field - timespan_from, timespan_to, timespan_row.
at line 45
void
modifyListFieldFdl(ListItem $listItem, array $fieldFdl, bool $readonly, bool $setSavedValues)
No description
at line 64
null|mixed
prepareFilterValue(array $fieldFdl)
A static text, which always contains the same (default) value, shouldn't be set as a filter.
in
Field at line 97
void
processSavingInformation(ListItem $listItem, array $formData, array $fieldFdl)
Processes the information on saving the list item.
Sets the list item properties, which will be saved later.
in
Field at line 132
mixed
replacePlaceholdersWithValues(array $placeholders, array $fieldFdl)
Replaces the placeholders with the values of their fields.
in
Field at line 349
bool
requiredValueFits(array $fieldFdl, string $fieldValue)
When list items will be created or updated through the webservice API, this gets interesting as this determines whether a field has predefined values (like select-, and checkbox-fields, as these contain 'pop_data[]').
Upon calling this method on a certain field object, the data provided by a user is matched against the predefined values of that field. If they match, this method returns true, otherwise false.
in
Field at line 308
bool
validateResource(ListsController $mod, array $fieldFdl, bool $roomRequested, bool $ticketRequested, array $fieldErrors, bool $result)
Validates the resources and their bookings.