CoolCMS API

AdvertPlaceFormTrait

Add/edit form of an advert place.

Multilingual name + title (tabs), HTML attributes (class/id/width/height), the active flag and a multiplier of adverts (M2M through Picker).

Presenter dependencies:

Table of Contents

Methods

createComponentEditForm()  : Form
addAdvertMultiplier()  : void
Multiplier of adverts (M2M through Picker; row = hidden `advertId` + label).
addAdvertPlaceAttributeFields()  : void
addAdvertPlaceTranslationFields()  : void
Multilingual fields — active translation switch, name, title.
buildAdvertPlaceEntity()  : AdvertPlace
buildAdverts()  : ArrayCollection<int, AdvertPlaceRel>
findAdvertPlaceTranslation()  : AdvertPlaceText|null
getAdvertPlaceFormLanguages()  : array<int, Language>
nStr()  : string
nStrOrNull()  : string|null
saveAdvertPlaceForm()  : bool
setAdvertPlaceFormDefaults()  : void
storedAdvertOrders()  : array<int, int>
Stored order of the adverts of the edited place (advert id to `order`), sorted by `order`.

Methods

addAdvertMultiplier()

Multiplier of adverts (M2M through Picker; row = hidden `advertId` + label).

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

addAdvertPlaceTranslationFields()

Multilingual fields — active translation switch, name, title.

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

nStr()

private nStr(mixed $value) : string
Parameters
$value : mixed
Return values
string

nStrOrNull()

private nStrOrNull(mixed $value) : string|null
Parameters
$value : mixed
Return values
string|null

saveAdvertPlaceForm()

private saveAdvertPlaceForm(ArrayHash<string|int, mixed> $values) : bool
Parameters
$values : ArrayHash<string|int, mixed>
Return values
bool

storedAdvertOrders()

Stored order of the adverts of the edited place (advert id to `order`), sorted by `order`.

private storedAdvertOrders() : array<int, int>
Return values
array<int, int>
On this page

Search results