CoolCMS API

AdvertForm extends ParameterForm
in package
uses LoadingTrait, FormFieldsTrait, BuildAdvertTrait, UploaderTrait, RegionSuggestHostTrait

Abstract component for a modular form built from parameters.

A child component supplies:

  • loadParameters() and loadParameterGroups(): data from its own managers
  • buildContext(): fills items for special selects (currency, region, comcat)
  • getMode(): form or search (form by default)
  • processSubmit(): saving or submitting the values (runs before the $onSuccess callbacks)
  • optionally getEntityValues(): prefill from an entity
  • optionally beforeSubmitButton(): custom fields before the submit button
  • optionally buildRegistry(): custom handlers

Table of Contents

Constants

ADVERT_PASSWORD_MIN_LENGTH  : mixed = 6
Minimum length of a custom edit password of an advert.
REGION_PREVIEW_KEYS  : array<string|int, mixed> = ['city', 'zip', 'country']
Parameters that the preview prefills after a selection (parameter key = item data key).

Properties

$container  : Container
$onError  : array<string|int, callable(Form, static): void>
Signature: function(Form $form, self $component): void
$onSuccess  : array<string|int, callable(Form, ArrayHash, static): void>
$onValidate  : array<string|int, callable(Form, ArrayHash, static): void>
Events for the consumer (presenter / parent control). `ParameterForm` only renders and validates; business logic (save, email, redirect) belongs to whoever instantiates the component.
$routerDispatcher  : RouterDispatcher
$translator  : ITranslator
$appContext  : AppContext
$componentParameters  : array<string, mixed>
$context  : ParameterFormContext
$currencyContext  : CurrencyContext|null
$deviceDetector  : DeviceDetector|null
$itemsByGroups  : array<int, array<int, ParameterFormItem>>
$languageContext  : LanguageContext|null
$localizationContext  : LocalizationContext|null
$parameterAndOptionList  : array<int, ParameterInterface>
$parameterGroupList  : array<int, ParameterGroupInterface>
$parameterItems  : array<int, ParameterFormItem>
$registry  : ParameterHandlerRegistry
$settingContext  : SettingContext
$themeContext  : ThemeContext|null
$translatorDomain  : string|null
Translation domain is set by the module subclass (`AdvertForm`, `AdvertFilterBox`, ...).
$advert  : Advert|null
$advertManager  : AdvertManager
$blacklistedWordManager  : BlacklistedWordManager
$categoryList  : array<string|int, Category>
$categoryParameterRelManager  : CategoryParameterRelManager
$currencyManager  : CurrencyManager
$fieldBuilder  : ParameterFieldBuilder|null
$parameterGroupManager  : ParameterGroupManager
$parameterManager  : ParameterManager
$parametersInitialized  : bool
$regionManager  : RegionManager
$regionSuggestFactory  : RegionSuggestFactory
$uploaderDropzoneFactory  : UploaderDropzoneFactory
$userManager  : UserManager

Methods

__call()  : mixed
Dispatches `renderXyz()` to `render('Xyz', ...$args)`.
__construct()  : mixed
buildAdvert()  : Advert
Builds the Advert entity from submitted values. Public: the consumer (or {@see \App\UI\Front\Comcat\Components\AdvertFormComponent\AdvertForm::processSubmit()}) uses it to get a fully prepared entity without persistence.
createComponent()  : IComponent|null
getActiveFilters()  : array<int, array{parameterId: int, parameter: string, label: string, remove: array|null}>
Returns active filters for the badges above the list (`.pactive`), one entry per cancelable value, so "Sony" and "Canon" are two badges, not one.
getAdvert()  : Advert|null
getAppContext()  : AppContext
getComponentParameter()  : mixed
Returns a component parameter, or null when it is not set.
getContainer()  : Container
getCurrencyContext()  : CurrencyContext|null
getGroupChosenCount()  : int
Returns how many options of a group are selected, shown as a badge on the collapsible heading (`.filter-box__chosen`) so a collapsed group still shows that it filters.
getLanguageContext()  : LanguageContext|null
getLocalizationContext()  : LocalizationContext|null
getRouterDispatcher()  : RouterDispatcher
getSettingContext()  : SettingContext
getSettings()  : array<int, array<string, mixed>>
getThemeContext()  : ThemeContext|null
getUploaderControlMap()  : array<string|int, mixed>
Overrides the parent {@see \App\UI\Front\Base\Components\ParameterFormComponent\ParameterForm::getUploaderControlMap()}: maps the first IMAGE_UPLOADER to the shared `imgUploader` and the first FILE_UPLOADER to `fileUploader`.
getUploaderParameterIds()  : array<string|int, int>
Ids of parameters that have a dropzone uploader. A child may override it for different behavior (for example no uploaders: an empty array).
hasServiceByType()  : bool
Returns whether the container has a service of the given type.
initializeAllContexts()  : void
injectDeviceDetector()  : void
onCreate()  : void
render()  : void
renderActiveFilters()  : void
Renders badges of active filters above the list, not inside the filter: otherwise canceling a filter would be reachable only by scrolling back up.
renderJs()  : void
setAdvert()  : self
setAppContext()  : $this
setCategoryList()  : self
setComponentParameter()  : void
Sets a component parameter.
setCurrencyContext()  : $this
setLanguageContext()  : $this
setLocalizationContext()  : $this
setSettingContext()  : $this
setThemeContext()  : $this
setup()  : void
setupAppContext()  : void
typedComponent()  : T
Returns a subcomponent with a verified type.
uploaderName()  : string
Name of the child uploader component for an upload parameter.
beforeRender()  : void
Hook: a child component may add its own template variables (for example the edited entity).
beforeSubmitButton()  : void
buildContext()  : void
buildRegistry()  : ParameterHandlerRegistry
Default registry covering all `ParameterType` constants. A child component may override it to add its own handlers (for example module-specific types).
createComponentFileUploader()  : UploaderDropzone
createComponentForm()  : Form
createComponentImgUploader()  : UploaderDropzone
createComponentRegionSuggest()  : Multiplier<string|int, RegionSuggest>
extractParameterValues()  : array<int, array<int, array{value: mixed, value2?: ?string}>>
Helper that extracts form values. Returns only persistable parameters, i.e. not file/image types.
findParameterByKey()  : ParameterInterface|null
frontPresenter()  : BasePresenter|null
Returns the front presenter the component is attached to (null outside the front end or when detached).
getEntityValues()  : array<int, mixed>
getFieldBuilder()  : ParameterFieldBuilder
Lazy shared builder of parameter fields, initialized from the resolved engine state (items/groups/context/mode). Entity values are read at the first build (after `setAdvert()`/`setCategoryList()`), as with {@see \App\Core\Form\Parameters\Building\DefaultsTrait::applyDefaults()}.
getMode()  : string
Hook: mode that selects `getType` or `getSearchType` on a parameter.
getParameterTranslation()  : ParameterTextInterface|null
getSubmitLabel()  : string
Hook: translation key of the submit button caption.
getTranslator()  : ITranslator
hasResolvedType()  : bool
For a child component: tells whether the form contains a parameter of the given type (respecting the mode via `resolveType()`).
initParameters()  : void
isUploadParameter()  : bool
A classic `IMAGE` / `FILE` parameter has its own `<input type="file">` (via the handler); the dropzone uploader handles only the multi-upload `*_UPLOADER` variants.
loadParameterGroups()  : array<string|int, mixed>
loadParameters()  : array<string|int, ParameterFormItem>
parameterKey()  : string
Form control key of a parameter (`parameter_<id>`). Field building is done by the shared {@see \App\Core\Form\Parameters\ParameterFieldBuilder}, but the engine and its consumers (filter URL params, email/region denormalization) need the same key to look up submitted values.
processSubmit()  : void
resolveDefaultValue()  : string|null
resolveType()  : int|null
setTemplateFile()  : void
setTranslator()  : self
usesDefaultParameters()  : bool
Hook: when a child component returns true, only parameters with `getDefault()` = true (classic) or `getSearchDefault()` = true (search) are shown.
aggregateCategoryParameterRels()  : array<int, array{order: int, required: bool, groupId: ?int}>
Aggregates CategoryParameterRels across all categories into a map parameterId => ['order' => MIN, 'required' => OR, 'groupId' => first-wins].
applyParameterRels()  : void
Builds the object-graph collection `parameterRels` from the submitted rows. `parameter` is a light reference (`new Parameter()->setId($id)`) that `EntityHydrator::extract` serializes as `{"id":{"id":X}}` and the Api `hydrateForPersist` resolves as a managed entity.
buildCurrencyItems()  : array<int, string>
buildParameterAndOptionList()  : void
Returns ids of the parameters that this parameterId uses (directly or through options), for lookup from rules. Options have no per-category override, so they are read straight from the Parameter entity.
buildRegionItems()  : array<int, string>
Parameter SELECT_REGION: a plain `<select>`, not a Picker.
buildRegionPreviewFieldMap()  : array<string, string>
configureUploaders()  : void
createMultiplierComponent()  : Multiplier<string|int, IComponent>
Creates a multiplier for the component.
createNewComponentInstance()  : IComponent|null
Creates a new component instance without adding it to the presenter; used by the multiplier.
createStandardComponent()  : IComponent|null
Creates a standard component (not a multiplier).
findFirstParameterOfType()  : Parameter|null
gateAdvertColumns()  : void
Column gate of the contact e-mail parameter: it is written into the profile column `email` varchar(255) ({@see BuildAdvertTrait}). The parameter builder knows only the parameter type, so a longer value failed the whole save on the database with the generic "could not be saved" message instead of an error at the field.
getDefaultUserValues()  : array<int, mixed>
Pre-fills fields from the logged-in user for a new record (edit has its own values from the entity). Dynamic parameters have no "default from user" in the code list, so the mapping is hard-wired via `Parameter::getKey()`: a key is mapped only when the form really contains a parameter with that key (otherwise it is skipped).
getRegionLabel()  : string
indexById()  : array<int, T>
indexItemsByGroups()  : void
indexItemsById()  : array<int, ParameterFormItem>
initRegionPickerContext()  : void
Selection validator for {@see ParameterFormContext::$regionValidator}: the advert form accepts only an active municipality (tree leaf), so an old advert filed under a country forces choosing a municipality on edit.
loadAdvertValues()  : array<int, mixed>
Values of the edited record: parameterId => value | value[] | ['value', 'value2'].
parameterControl()  : BaseControl|null
Form control of the parameter with the given key, null when the category does not use it.
parseFileTypes()  : array<string|int, string>
prepareExistingAssets()  : array<int, array<string, mixed>>
prepareExistingFiles()  : array<int, array<string, mixed>>
setExpirationDate()  : void

Constants

ADVERT_PASSWORD_MIN_LENGTH

Minimum length of a custom edit password of an advert.

private mixed ADVERT_PASSWORD_MIN_LENGTH = 6

REGION_PREVIEW_KEYS

Parameters that the preview prefills after a selection (parameter key = item data key).

private array<string|int, mixed> REGION_PREVIEW_KEYS = ['city', 'zip', 'country']

Properties

$onError

Signature: function(Form $form, self $component): void

public array<string|int, callable(Form, static): void> $onError = []

$onSuccess

public array<string|int, callable(Form, ArrayHash, static): void> $onSuccess = []

$onValidate

Events for the consumer (presenter / parent control). `ParameterForm` only renders and validates; business logic (save, email, redirect) belongs to whoever instantiates the component.

public array<string|int, callable(Form, ArrayHash, static): void> $onValidate = []

Signature: function(Form $form, ArrayHash $values, self $component): void

$componentParameters

protected array<string, mixed> $componentParameters = []

component parameters set by setComponentParameter()

$parameterAndOptionList

protected array<int, ParameterInterface> $parameterAndOptionList = []

parameters together with their options (for lookup from rules)

$parameterItems

protected array<int, ParameterFormItem> $parameterItems = []

indexed by parameterId, with values resolved per form (order/required/groupId)

$translatorDomain

Translation domain is set by the module subclass (`AdvertForm`, `AdvertFilterBox`, ...).

protected string|null $translatorDomain = 'front.comcat.components.advertForm'

$parametersInitialized

private bool $parametersInitialized = false

Methods

__call()

Dispatches `renderXyz()` to `render('Xyz', ...$args)`.

public __call(string $name, array<string|int, mixed> $args) : mixed

Called only when the component has no renderXyz() method of its own.

Parameters
$name : string
$args : array<string|int, mixed>

__construct()

public __construct(AdvertManager $advertManager, ParameterManager $parameterManager, ParameterGroupManager $parameterGroupManager, CurrencyManager $currencyManager, RegionManager $regionManager, UploaderDropzoneFactory $uploaderDropzoneFactory, UserManager $userManager, CategoryParameterRelManager $categoryParameterRelManager, BlacklistedWordManager $blacklistedWordManager, RegionSuggestFactory $regionSuggestFactory) : mixed
Parameters
$advertManager : AdvertManager
$parameterManager : ParameterManager
$parameterGroupManager : ParameterGroupManager
$currencyManager : CurrencyManager
$regionManager : RegionManager
$uploaderDropzoneFactory : UploaderDropzoneFactory
$userManager : UserManager
$categoryParameterRelManager : CategoryParameterRelManager
$blacklistedWordManager : BlacklistedWordManager
$regionSuggestFactory : RegionSuggestFactory

buildAdvert()

Builds the Advert entity from submitted values. Public: the consumer (or {@see \App\UI\Front\Comcat\Components\AdvertFormComponent\AdvertForm::processSubmit()}) uses it to get a fully prepared entity without persistence.

public buildAdvert(ArrayHash $values[, string|null $passwordHash = null ]) : Advert
Parameters
$values : ArrayHash
$passwordHash : string|null = null
Return values
Advert

createComponent()

public createComponent(string $name) : IComponent|null
Parameters
$name : string
Return values
IComponent|null

getActiveFilters()

Returns active filters for the badges above the list (`.pactive`), one entry per cancelable value, so "Sony" and "Canon" are two badges, not one.

public getActiveFilters() : array<int, array{parameterId: int, parameter: string, label: string, remove: array|null}>

Read from request parameters (p[<parameterId>]) and from already loaded parameter entities (optionsCollection is in the filter includes), so it costs no extra query.

remove is the p value without that one option; the template turns it into a link via {plink}. When nothing remains after removal it is null and the link leads to the list without a filter.

Return values
array<int, array{parameterId: int, parameter: string, label: string, remove: array|null}>

getComponentParameter()

Returns a component parameter, or null when it is not set.

public getComponentParameter(string $name) : mixed
Parameters
$name : string

getContainer()

public getContainer() : Container
Return values
Container

getGroupChosenCount()

Returns how many options of a group are selected, shown as a badge on the collapsible heading (`.filter-box__chosen`) so a collapsed group still shows that it filters.

public getGroupChosenCount(ControlGroup $group) : int

Counted from the form values, i.e. request parameters, so it costs no extra query. A multi-value field (CheckboxList/MultiSelect) counts per item, a single-value one as 1. Buttons and hidden fields are skipped: they are not user choices.

Lives on the shared base because Style_Filter.latte serves the e-shop, advert and company catalog filters, so every child gets it at once.

Parameters
$group : ControlGroup
Return values
int

getSettings()

public getSettings() : array<int, array<string, mixed>>
Return values
array<int, array<string, mixed>>

getUploaderControlMap()

Overrides the parent {@see \App\UI\Front\Base\Components\ParameterFormComponent\ParameterForm::getUploaderControlMap()}: maps the first IMAGE_UPLOADER to the shared `imgUploader` and the first FILE_UPLOADER to `fileUploader`.

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

Other parameters of the same type get a classic input (no dropzone).

Return values
array<string|int, mixed>

getUploaderParameterIds()

Ids of parameters that have a dropzone uploader. A child may override it for different behavior (for example no uploaders: an empty array).

public getUploaderParameterIds() : array<string|int, int>
Return values
array<string|int, int>

hasServiceByType()

Returns whether the container has a service of the given type.

public hasServiceByType(string $className) : bool

The name is composed dynamically (module plus component), so class_exists() runs first, and a true result guarantees a valid type.

Parameters
$className : string
Tags
phpstan-assert-if-true

class-string $className

Return values
bool

render()

public render([string $style = 'Style_1' ]) : void
Parameters
$style : string = 'Style_1'

renderActiveFilters()

Renders badges of active filters above the list, not inside the filter: otherwise canceling a filter would be reachable only by scrolling back up.

public renderActiveFilters() : void

Called from the list template as {control filterBox:activeFilters}. Renders nothing at all (not even an empty wrapper) when no filter is active.

setAdvert()

public setAdvert(Advert|null $advert) : self
Parameters
$advert : Advert|null
Return values
self

setCategoryList()

public setCategoryList(array<string|int, Category> $categoryList) : self
Parameters
$categoryList : array<string|int, Category>
Return values
self

setComponentParameter()

Sets a component parameter.

public setComponentParameter(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed

typedComponent()

Returns a subcomponent with a verified type.

public typedComponent(string $name, T> $type) : T

Use it instead of an inline @var above $this['x'] (which does not narrow the type) and instead of the generic IComponent that $this['x'] returns. See Form::typedComponent().

Parameters
$name : string
$type : T>
Tags
template
Return values
T

uploaderName()

Name of the child uploader component for an upload parameter.

public uploaderName(ParameterInterface $parameter) : string

In Latte: {control "uploader_$parameterId"}.

Parameters
$parameter : ParameterInterface
Return values
string

beforeRender()

Hook: a child component may add its own template variables (for example the edited entity).

protected beforeRender(string $style) : void
Parameters
$style : string

extractParameterValues()

Helper that extracts form values. Returns only persistable parameters, i.e. not file/image types.

protected extractParameterValues(ArrayHash $values) : array<int, array<int, array{value: mixed, value2?: ?string}>>

The key is parameterId, the value a list of rows to persist; the handler decides (scalar: 1 row, multiselect: N rows, range: 1 row with value+value2).

Parameters
$values : ArrayHash
Return values
array<int, array<int, array{value: mixed, value2?: ?string}>>

frontPresenter()

Returns the front presenter the component is attached to (null outside the front end or when detached).

protected frontPresenter() : BasePresenter|null
Return values
BasePresenter|null

getEntityValues()

protected getEntityValues() : array<int, mixed>
Return values
array<int, mixed>

getFieldBuilder()

Lazy shared builder of parameter fields, initialized from the resolved engine state (items/groups/context/mode). Entity values are read at the first build (after `setAdvert()`/`setCategoryList()`), as with {@see \App\Core\Form\Parameters\Building\DefaultsTrait::applyDefaults()}.

protected getFieldBuilder() : ParameterFieldBuilder
Return values
ParameterFieldBuilder

getMode()

Hook: mode that selects `getType` or `getSearchType` on a parameter.

protected getMode() : string

Form by default (advert/insert); search forms return MODE_SEARCH.

Return values
string

getSubmitLabel()

Hook: translation key of the submit button caption.

protected getSubmitLabel() : string
Return values
string

getTranslator()

protected getTranslator() : ITranslator
Return values
ITranslator

hasResolvedType()

For a child component: tells whether the form contains a parameter of the given type (respecting the mode via `resolveType()`).

protected hasResolvedType(int $type) : bool
Parameters
$type : int
Return values
bool

initParameters()

protected initParameters() : void

isUploadParameter()

A classic `IMAGE` / `FILE` parameter has its own `<input type="file">` (via the handler); the dropzone uploader handles only the multi-upload `*_UPLOADER` variants.

protected isUploadParameter(ParameterInterface $parameter) : bool
Parameters
$parameter : ParameterInterface
Return values
bool

loadParameterGroups()

protected loadParameterGroups() : array<string|int, mixed>
Return values
array<string|int, mixed>

parameterKey()

Form control key of a parameter (`parameter_<id>`). Field building is done by the shared {@see \App\Core\Form\Parameters\ParameterFieldBuilder}, but the engine and its consumers (filter URL params, email/region denormalization) need the same key to look up submitted values.

protected parameterKey(ParameterInterface $parameter) : string
Parameters
$parameter : ParameterInterface
Return values
string

processSubmit()

protected processSubmit(Form $form, ArrayHash $values) : void
Parameters
$form : Form
$values : ArrayHash

setTemplateFile()

protected setTemplateFile(string $dir, string $filename) : void
Parameters
$dir : string
$filename : string

setTranslator()

protected setTranslator(ITranslator $translator) : self
Parameters
$translator : ITranslator
Return values
self

usesDefaultParameters()

Hook: when a child component returns true, only parameters with `getDefault()` = true (classic) or `getSearchDefault()` = true (search) are shown.

protected usesDefaultParameters() : bool
Return values
bool

aggregateCategoryParameterRels()

Aggregates CategoryParameterRels across all categories into a map parameterId => ['order' => MIN, 'required' => OR, 'groupId' => first-wins].

private aggregateCategoryParameterRels(array<string|int, Category> $categories) : array<int, array{order: int, required: bool, groupId: ?int}>
Parameters
$categories : array<string|int, Category>
Return values
array<int, array{order: int, required: bool, groupId: ?int}>

applyParameterRels()

Builds the object-graph collection `parameterRels` from the submitted rows. `parameter` is a light reference (`new Parameter()->setId($id)`) that `EntityHydrator::extract` serializes as `{"id":{"id":X}}` and the Api `hydrateForPersist` resolves as a managed entity.

private applyParameterRels(Advert $advert, array<int, array{id: int, value: string, value2?: string}> $rows) : void

IMPORTANT: call only when $rows !== []. Replacing the collection with an empty array would make orphanRemoval on the Api side delete all existing parameters of the advert. An empty submit leaves the collection untouched (the clone carries the old state).

Parameters
$advert : Advert
$rows : array<int, array{id: int, value: string, value2?: string}>

buildCurrencyItems()

private buildCurrencyItems() : array<int, string>
Return values
array<int, string>

buildParameterAndOptionList()

Returns ids of the parameters that this parameterId uses (directly or through options), for lookup from rules. Options have no per-category override, so they are read straight from the Parameter entity.

private buildParameterAndOptionList() : void

buildRegionItems()

Parameter SELECT_REGION: a plain `<select>`, not a Picker.

private buildRegionItems() : array<int, string>

IMPORTANT: only country and region (level <= 2): after importing municipalities into cms_system_regions (about 9,500 nodes) an unfiltered findAll() would flood the select. Picking a municipality or district is up to the suggest, not this select.

Return values
array<int, string>

buildRegionPreviewFieldMap()

private buildRegionPreviewFieldMap() : array<string, string>
Return values
array<string, string> —

data key => form control name of the parameter

createMultiplierComponent()

Creates a multiplier for the component.

private createMultiplierComponent(string $name) : Multiplier<string|int, IComponent>
Parameters
$name : string
Return values
Multiplier<string|int, IComponent>

createNewComponentInstance()

Creates a new component instance without adding it to the presenter; used by the multiplier.

private createNewComponentInstance(string $baseName[, int|string|null $uniqueKey = null ]) : IComponent|null
Parameters
$baseName : string
$uniqueKey : int|string|null = null
Return values
IComponent|null

createStandardComponent()

Creates a standard component (not a multiplier).

private createStandardComponent(string $name) : IComponent|null
Parameters
$name : string
Return values
IComponent|null

gateAdvertColumns()

Column gate of the contact e-mail parameter: it is written into the profile column `email` varchar(255) ({@see BuildAdvertTrait}). The parameter builder knows only the parameter type, so a longer value failed the whole save on the database with the generic "could not be saved" message instead of an error at the field.

private gateAdvertColumns(Form $form) : void
Parameters
$form : Form

getDefaultUserValues()

Pre-fills fields from the logged-in user for a new record (edit has its own values from the entity). Dynamic parameters have no "default from user" in the code list, so the mapping is hard-wired via `Parameter::getKey()`: a key is mapped only when the form really contains a parameter with that key (otherwise it is skipped).

private getDefaultUserValues() : array<int, mixed>

IMPORTANT: this branch hangs on getEntityValues() from this trait. A custom getEntityValues() returned in AdvertForm overrides the trait (a class method wins over a trait method) and the pre-fill silently disappears.

Return values
array<int, mixed>

indexById()

private indexById(array<string|int, T> $items) : array<int, T>
Parameters
$items : array<string|int, T>
Tags
template
Return values
array<int, T>

indexItemsByGroups()

private indexItemsByGroups() : void

initRegionPickerContext()

Selection validator for {@see ParameterFormContext::$regionValidator}: the advert form accepts only an active municipality (tree leaf), so an old advert filed under a country forces choosing a municipality on edit.

private initRegionPickerContext() : void

loadAdvertValues()

Values of the edited record: parameterId => value | value[] | ['value', 'value2'].

private loadAdvertValues() : array<int, mixed>

parameterId is read from the relation column, not from getParameter()->getId(): the association may not be loaded (the include parameterRels.parameter is up to the caller) and without the column the whole row would be silently dropped. getParameter() only looks up the type.

Return values
array<int, mixed>

parameterControl()

Form control of the parameter with the given key, null when the category does not use it.

private parameterControl(Form $form, string $key) : BaseControl|null
Parameters
$form : Form
$key : string
Return values
BaseControl|null

parseFileTypes()

private parseFileTypes(string|null $fileType, array<string|int, string> $fallback) : array<string|int, string>
Parameters
$fileType : string|null
$fallback : array<string|int, string>
Return values
array<string|int, string>

prepareExistingAssets()

private prepareExistingAssets() : array<int, array<string, mixed>>
Return values
array<int, array<string, mixed>>

prepareExistingFiles()

private prepareExistingFiles() : array<int, array<string, mixed>>
Return values
array<int, array<string, mixed>>
On this page

Search results