PHP Класс Craft\AmFormsVariable

Показать файл Открыть проект

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

Метод Описание
displayAntispam ( ) : boolean | string Display AntiSpam widget.
displayForm ( string $handle ) : string Display a form.
displayRecaptcha ( ) : boolean | string Display a reCAPTCHA widget.
displaySubmission ( integer $id ) : string Display a submission to edit and save it.
getAllForms ( ) : array Get all forms.
getFieldHandles ( ) : array Get field handles.
getForm ( string $handle ) : AmForms_FormModel | null Get a form by its handle.
getFormByHandle ( string $handle ) : AmForms_FormModel | null Get a form by its handle.
getFormById ( integer $id ) : AmForms_FormModel | null Get a form by its ID.
getName ( ) : string Get the Plugin's name.
getNamespaceForForm ( AmForms_FormModel $form ) : string Get a namespace for a form.
getProperFieldTypes ( array $fieldTypes ) : array Get proper field types.
getSettingsValueByHandleAndType ( string $handle, string $type, mixed $defaultValue = null ) : mixed Get a setting value by their handle and type.
getSubmissionById ( integer $id, boolean $setAsActive = false ) : craft\AmForms_SubmissionModel | null Get a submission by its ID.
submissions ( array $attributes = [] ) : craft\ElementCriteriaModel Returns a criteria model for AmForms_Submission elements.

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

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

Display AntiSpam widget.
public displayAntispam ( ) : boolean | string
Результат boolean | string

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

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

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

Display a reCAPTCHA widget.
public displayRecaptcha ( ) : boolean | string
Результат boolean | string

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

Display a submission to edit and save it.
public displaySubmission ( integer $id ) : string
$id integer
Результат string

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

Get all forms.
public getAllForms ( ) : array
Результат array

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

Get field handles.
public getFieldHandles ( ) : array
Результат array

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

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

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

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

Get the Plugin's name.
public getName ( ) : string
Результат string

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

Get a namespace for a form.
public getNamespaceForForm ( AmForms_FormModel $form ) : string
$form AmForms_FormModel
Результат string

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

Get proper field types.
public getProperFieldTypes ( array $fieldTypes ) : array
$fieldTypes array All Craft's fieldtypes.
Результат array

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

Get a setting value by their handle and type.
public getSettingsValueByHandleAndType ( string $handle, string $type, mixed $defaultValue = null ) : mixed
$handle string
$type string
$defaultValue mixed
Результат mixed

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

Get a submission by its ID.
public getSubmissionById ( integer $id, boolean $setAsActive = false ) : craft\AmForms_SubmissionModel | null
$id integer
$setAsActive boolean [Optional] Set as active submission, for editing purposes.
Результат craft\AmForms_SubmissionModel | null

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

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