FieldsVariable

Type
Class
Namespace
Craft
Inherits
Craft\FieldsVariable
Since
1.0

Class FieldsVariable

See also http://craftcms.com

View source (opens new window)

# Public Methods

Method Description
getAllFieldTypes() Returns all installed fieldtypes.
getAllFields() Returns all fields.
getAllGroups() Returns all field groups.
getFieldByHandle() Returns a field by its handle.
getFieldById() Returns a field by its ID.
getFieldType() Gets a fieldtype.
getFieldsByGroupId() Returns all the fields in a given group.
getGroupById() Returns a field group by its ID.
getLayoutById() Returns a field layout by its ID.
getLayoutByType() Returns a field layout by its type.
populateFieldType() Populates a fieldtype.

# getAllFieldTypes()

Returns all installed fieldtypes.

View source (opens new window)

Returns

array (opens new window)

Signature

public array getAllFieldTypes ( )

# getAllFields()

Signature

public array getAllFields ( $indexBy = null )

# getAllGroups()

Signature

public array getAllGroups ( $indexBy = null )

# getFieldByHandle()

Returns a field by its handle.

View source (opens new window)

Arguments

Returns

Craft\FieldModel, null (opens new window)

Signature

public Craft\FieldModel, null getFieldByHandle ( $handle )

# getFieldById()

Signature

public Craft\FieldModel, null getFieldById ( $fieldId )

# getFieldType()

Signature

public Craft\FieldTypeVariable, null getFieldType ( $class )

# getFieldsByGroupId()

Returns all the fields in a given group.

View source (opens new window)

Arguments

Returns

array (opens new window)

Signature

public array getFieldsByGroupId ( $groupId, $indexBy = null )

# getGroupById()

Signature

public Craft\FieldGroupModel, null getGroupById ( $groupId )

# getLayoutById()

Returns a field layout by its ID.

View source (opens new window)

Arguments

Returns

Craft\FieldLayoutModel, null (opens new window)

Signature

public Craft\FieldLayoutModel, null getLayoutById ( $layoutId )

# getLayoutByType()

Signature

public Craft\FieldLayoutModel, null getLayoutByType ( $type )

# populateFieldType()

Signature

public Craft\BaseFieldType, null populateFieldType ( Craft\FieldModel $field, $element = null )