CoolCMS API

TagFormTrait

Add and edit form of a tag.

A tag is a purely multilingual entity (a translated name plus an active-translation flag). The skeleton (check, domain translator, save/update/cancel buttons and the return) comes from BasePresenter::createForm().

Table of Contents

Methods

createComponentEditForm()  : Form
addTranslationFields()  : void
Multilingual fields, one set per language (`name_<langId>`), active per checkbox.
buildTagEntity()  : Tag
saveTagForm()  : bool
setTagFormDefaults()  : void

Methods

addTranslationFields()

Multilingual fields, one set per language (`name_<langId>`), active per checkbox.

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

buildTagEntity()

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

saveTagForm()

private saveTagForm(ArrayHash<string|int, mixed> $values) : bool
Parameters
$values : ArrayHash<string|int, mixed>
Return values
bool
On this page

Search results