PHP Class Craft\AmForms_FormElementType

Inheritance: extends craft\BaseElementType
Datei anzeigen Open project: am-impact/amforms

Public Methods

Method Description
defineAvailableTableAttributes ( string | null $source = null ) : array Returns the attributes that can be shown/sorted by in table views.
defineCriteriaAttributes ( ) : array Defines any custom element criteria attributes for this element type.
defineSearchableAttributes ( ) : array Defines which model attributes should be searchable.
defineSortableAttributes ( ) : array Returns the attributes that can be sorted by in table views.
getEditorHtml ( craft\BaseElementModel $element ) : string
getName ( ) : string Returns the element type name.
getSources ( string | null $context = null ) : array | false Returns this element type's sources.
getTableAttributeHtml ( craft\BaseElementModel $element, string $attribute ) : string
hasContent ( ) : boolean Returns whether this element type has content.
isLocalized ( ) : boolean Returns whether this element type stores data on a per-locale basis.
modifyElementsQuery ( craft\DbCommand $query, craft\ElementCriteriaModel $criteria ) : mixed Modifies an element query targeting elements of this type.
populateElementModel ( array $row ) : AmForms_FormModel Populates an element model based on a query result.

Method Details

defineAvailableTableAttributes() public method

Returns the attributes that can be shown/sorted by in table views.
public defineAvailableTableAttributes ( string | null $source = null ) : array
$source string | null
return array

defineCriteriaAttributes() public method

Defines any custom element criteria attributes for this element type.
public defineCriteriaAttributes ( ) : array
return array

defineSearchableAttributes() public method

Defines which model attributes should be searchable.
public defineSearchableAttributes ( ) : array
return array

defineSortableAttributes() public method

Returns the attributes that can be sorted by in table views.
public defineSortableAttributes ( ) : array
return array

getEditorHtml() public method

public getEditorHtml ( craft\BaseElementModel $element ) : string
$element craft\BaseElementModel
return string

getName() public method

Returns the element type name.
public getName ( ) : string
return string

getSources() public method

Returns this element type's sources.
public getSources ( string | null $context = null ) : array | false
$context string | null
return array | false

getTableAttributeHtml() public method

public getTableAttributeHtml ( craft\BaseElementModel $element, string $attribute ) : string
$element craft\BaseElementModel
$attribute string
return string

hasContent() public method

Returns whether this element type has content.
public hasContent ( ) : boolean
return boolean

isLocalized() public method

Returns whether this element type stores data on a per-locale basis.
public isLocalized ( ) : boolean
return boolean

modifyElementsQuery() public method

Modifies an element query targeting elements of this type.
public modifyElementsQuery ( craft\DbCommand $query, craft\ElementCriteriaModel $criteria ) : mixed
$query craft\DbCommand
$criteria craft\ElementCriteriaModel
return mixed

populateElementModel() public method

Populates an element model based on a query result.
public populateElementModel ( array $row ) : AmForms_FormModel
$row array
return AmForms_FormModel