BaseComponentTypeVariable

Type
Abstract Class
Namespace
Craft
Inherits
Craft\BaseComponentTypeVariable
Extended by
Craft\AssetSourceTypeVariable, Craft\ElementTypeVariable, Craft\FieldTypeVariable, Craft\PluginVariable, Craft\ToolVariable
Since
1.0

Component template variable class

See also http://craftcms.com

View source (opens new window)

# Protected Properties

Property Description
$component Craft\BaseComponentType

# $component

Signature

protected Craft\BaseComponentType $component = null

# Public Methods

Method Description
__construct() Constructor
__toString() Use the component's name as its string representation.
getClassHandle() Returns the component's class handle.
getName() Returns the component's name.
getSettingsHtml() Returns the component's settings HTML.
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.

# __construct()

Signature

public Craft\BaseComponentTypeVariable __construct ( $component )

# __toString()

Use the component's name as its string representation.

View source (opens new window)

Returns

string (opens new window)

Signature

public string __toString ( )

# getClassHandle()

Returns the component's class handle.

View source (opens new window)

Returns

string (opens new window)

Signature

public string getClassHandle ( )

# getName()

Returns the component's name.

View source (opens new window)

Returns

string (opens new window)

Signature

public string getName ( )

# getSettingsHtml()

Returns the component's settings HTML.

View source (opens new window)

Returns

string (opens new window)

Signature

public string getSettingsHtml ( )

# isSelectable()

Returns whether this component should be selectable when choosing a component of this type.

View source (opens new window)

Returns

boolean (opens new window)

Signature

public boolean isSelectable ( )

# populateVariables()

Mass-populates instances of this class with a given set of models.

View source (opens new window)

Arguments

Returns

array (opens new window)

Signature

public static array populateVariables ( $models )