FieldsVariable

Type
Class
Namespace
Craft
Inherits
Craft\FieldsVariable
Since
1.0

Class FieldsVariable

See also http://craftcms.com

View source

Public Methods

MethodDescription
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

Returns

array

Signature

public array getAllFieldTypes ( )

getAllFields()

Returns all fields.

View source

Arguments

Returns

array

Signature

public array getAllFields ( $indexBy = null )

getAllGroups()

Returns all field groups.

View source

Arguments

Returns

array

Signature

public array getAllGroups ( $indexBy = null )

getFieldByHandle()

Returns a field by its handle.

View source

Arguments

Returns

Craft\FieldModel, null

Signature

public Craft\FieldModel, null getFieldByHandle ( $handle )

getFieldById()

Returns a field by its ID.

View source

Arguments

Returns

Craft\FieldModel, null

Signature

public Craft\FieldModel, null getFieldById ( $fieldId )

getFieldType()

Gets a fieldtype.

View source

Arguments

Returns

Craft\FieldTypeVariable, null

Signature

public Craft\FieldTypeVariable, null getFieldType ( $class )

getFieldsByGroupId()

Returns all the fields in a given group.

View source

Arguments

Returns

array

Signature

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

getGroupById()

Returns a field group by its ID.

View source

Arguments

Returns

Craft\FieldGroupModel, null

Signature

public Craft\FieldGroupModel, null getGroupById ( $groupId )

getLayoutById()

Returns a field layout by its ID.

View source

Arguments

Returns

Craft\FieldLayoutModel, null

Signature

public Craft\FieldLayoutModel, null getLayoutById ( $layoutId )

getLayoutByType()

Returns a field layout by its type.

View source

Arguments

Returns

Craft\FieldLayoutModel, null

Signature

public Craft\FieldLayoutModel, null getLayoutByType ( $type )

populateFieldType()

Populates a fieldtype.

View source

Arguments

Returns

Craft\BaseFieldType, null

Signature

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