PHP 클래스 Craft\AmForms_FormsService

상속: extends craft\BaseApplicationComponent
파일 보기 프로젝트 열기: am-impact/amforms

공개 메소드들

메소드 설명
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