ElementTypeVariable

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

Element type template variable.

See also http://craftcms.com

View source (opens new window)

# Protected Properties

Property Description
$component Craft\BaseComponentType

# Public Methods

Method Description
__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 (opens new window)

Returns

array (opens new window)

Signature

public array defineSortableAttributes ( )

# getSources()

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

View source (opens new window)

Arguments

Returns

array (opens new window), false (opens new window)

Signature

public array, false getSources ( $context = null )

# getStatuses()

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

View source (opens new window)

Returns

array (opens new window), null (opens new window)

Signature

public array, null getStatuses ( )

# getTableAttributeHtml()

Returns the table view HTML for a given attribute.

View source (opens new window)

Arguments

Returns

string (opens new window)

Signature

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

# hasStatuses()

Returns whether this element type can have statuses.

View source (opens new window)

Returns

boolean (opens new window)

Signature

public boolean hasStatuses ( )

# hasTitles()

Returns whether this element type can have titles.

View source (opens new window)

Returns

boolean (opens new window)

Signature

public boolean hasTitles ( )

# isLocalized()

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

View source (opens new window)

Returns

boolean (opens new window)

Signature

public boolean isLocalized ( )