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()
Signature
public array defineSortableAttributes ( )
# getSources()
Return a key/label list of the element type's sources.
View source (opens new window)
Arguments
$context
(string (opens new window), null (opens new window))
Returns
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
Signature
public array, null getStatuses ( )
# getTableAttributeHtml()
Returns the table view HTML for a given attribute.
View source (opens new window)
Arguments
$element
(Craft\BaseElementModel)$attribute
(string (opens new window))
Returns
Signature
public string getTableAttributeHtml ( Craft\BaseElementModel $element, $attribute )
# hasStatuses()
Signature
public boolean hasStatuses ( )
# hasTitles()
Signature
public boolean hasTitles ( )
# isLocalized()
Returns whether this element type stores data on a per-locale basis.
View source (opens new window)
Returns
Signature
public boolean isLocalized ( )