PHP Класс Craft\AmForms_FormsService

Наследование: extends craft\BaseApplicationComponent
Показать файл Открыть проект

Открытые методы

Метод Описание
deleteForm ( AmForms_FormModel $form ) : boolean Delete a form.
displayField ( AmForms_FormModel $form, string $handle ) : string Display a field.
displayForm ( AmForms_FormModel $form ) : string Display a form.
getAllForms ( $indexBy = 'id' ) : AmForms_FormModel | array | null Get all forms.
getCriteria ( array $attributes = [] ) : craft\ElementCriteriaModel Returns a criteria model for AmForms_Form elements.
getFormByHandle ( string $handle ) : AmForms_FormModel | null Get a form by its handle.
getFormById ( integer $id ) : AmForms_FormModel | null Get a form by its ID.
getNamespaceForForm ( AmForms_FormModel $form, boolean $createNewOnEmpty = true ) : false | string Get a namespace for a form.
getUniqueNameAndHandle ( AmForms_FormModel $form ) Get unique name and handle for a form.
saveForm ( AmForms_FormModel $form ) : boolean Save a form.

Описание методов

deleteForm() публичный Метод

Delete a form.
public deleteForm ( AmForms_FormModel $form ) : boolean
$form AmForms_FormModel
Результат boolean

displayField() публичный Метод

Display a field.
public displayField ( AmForms_FormModel $form, string $handle ) : string
$form AmForms_FormModel
$handle string
Результат string

displayForm() публичный Метод

Display a form.
public displayForm ( AmForms_FormModel $form ) : string
$form AmForms_FormModel
Результат string

getAllForms() публичный Метод

Get all forms.
public getAllForms ( $indexBy = 'id' ) : AmForms_FormModel | array | null
Результат AmForms_FormModel | array | null

getCriteria() публичный Метод

Returns a criteria model for AmForms_Form elements.
public getCriteria ( array $attributes = [] ) : craft\ElementCriteriaModel
$attributes array
Результат craft\ElementCriteriaModel

getFormByHandle() публичный Метод

Get a form by its handle.
public getFormByHandle ( string $handle ) : AmForms_FormModel | null
$handle string
Результат AmForms_FormModel | null

getFormById() публичный Метод

Get a form by its ID.
public getFormById ( integer $id ) : AmForms_FormModel | null
$id integer
Результат AmForms_FormModel | null

getNamespaceForForm() публичный Метод

Get a namespace for a form.
public getNamespaceForForm ( AmForms_FormModel $form, boolean $createNewOnEmpty = true ) : false | string
$form AmForms_FormModel
$createNewOnEmpty boolean
Результат false | string

getUniqueNameAndHandle() публичный Метод

Get unique name and handle for a form.
public getUniqueNameAndHandle ( AmForms_FormModel $form )
$form AmForms_FormModel

saveForm() публичный Метод

Save a form.
public saveForm ( AmForms_FormModel $form ) : boolean
$form AmForms_FormModel
Результат boolean