ElementTypeVariable

Type
Class
Namespace
Craft
Inherits
Craft\ElementTypeVariable » Craft\BaseComponentTypeVariable
Since
1.0

Element type template variable.

See also http://craftcms.com

View source

Protected Properties

Public Methods

MethodDescription
__construct()Constructor
__toString()Use the component's name as its string representation.
defineSortableAttributes()Returns the attributes that elements can be sorted by.
getClassHandle()Returns the component's class handle.
getName()Returns the component's name.
getSettingsHtml()Returns the component's settings HTML.
getSources()Return a key/label list of the element type's sources.
getStatuses()Returns all of the possible statuses that elements of this type may have.
getTableAttributeHtml()Returns the table view HTML for a given attribute.
hasStatuses()Returns whether this element type can have statuses.
hasTitles()Returns whether this element type can have titles.
isLocalized()Returns whether this element type stores data on a per-locale basis.
isSelectable()Returns whether this component should be selectable when choosing a component of this type.
populateVariables()Mass-populates instances of this class with a given set of models.

defineSortableAttributes()

Returns the attributes that elements can be sorted by.

View source

Returns

array

Signature

public array defineSortableAttributes ( )

getSources()

Return a key/label list of the element type's sources.

View source

Arguments

Returns

array, false

Signature

public array, false getSources ( $context = null )

getStatuses()

Returns all of the possible statuses that elements of this type may have.

View source

Returns

array, null

Signature

public array, null getStatuses ( )

getTableAttributeHtml()

Returns the table view HTML for a given attribute.

View source

Arguments

Returns

string

Signature

public string getTableAttributeHtml ( Craft\BaseElementModel $element, $attribute )

hasStatuses()

Returns whether this element type can have statuses.

View source

Returns

boolean

Signature

public boolean hasStatuses ( )

hasTitles()

Returns whether this element type can have titles.

View source

Returns

boolean

Signature

public boolean hasTitles ( )

isLocalized()

Returns whether this element type stores data on a per-locale basis.

View source

Returns

boolean

Signature

public boolean isLocalized ( )