PHP Class Craft\AmFormsVariable

Datei anzeigen Open project: am-impact/amforms

Public Methods

Method Description
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.

Method Details

displayAntispam() public method

Display AntiSpam widget.
public displayAntispam ( ) : boolean | string
return boolean | string

displayForm() public method

Display a form.
public displayForm ( string $handle ) : string
$handle string
return string

displayRecaptcha() public method

Display a reCAPTCHA widget.
public displayRecaptcha ( ) : boolean | string
return boolean | string

displaySubmission() public method

Display a submission to edit and save it.
public displaySubmission ( integer $id ) : string
$id integer
return string

getAllForms() public method

Get all forms.
public getAllForms ( ) : array
return array

getFieldHandles() public method

Get field handles.
public getFieldHandles ( ) : array
return array

getForm() public method

Get a form by its handle.
public getForm ( string $handle ) : AmForms_FormModel | null
$handle string
return AmForms_FormModel | null

getFormByHandle() public method

Get a form by its handle.
public getFormByHandle ( string $handle ) : AmForms_FormModel | null
$handle string
return AmForms_FormModel | null

getFormById() public method

Get a form by its ID.
public getFormById ( integer $id ) : AmForms_FormModel | null
$id integer
return AmForms_FormModel | null

getName() public method

Get the Plugin's name.
public getName ( ) : string
return string

getNamespaceForForm() public method

Get a namespace for a form.
public getNamespaceForForm ( AmForms_FormModel $form ) : string
$form AmForms_FormModel
return string

getProperFieldTypes() public method

Get proper field types.
public getProperFieldTypes ( array $fieldTypes ) : array
$fieldTypes array All Craft's fieldtypes.
return array

getSettingsValueByHandleAndType() public method

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
return mixed

getSubmissionById() public method

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.
return craft\AmForms_SubmissionModel | null

submissions() public method

Returns a criteria model for AmForms_Submission elements.
public submissions ( array $attributes = [] ) : craft\ElementCriteriaModel
$attributes array
return craft\ElementCriteriaModel