FieldLayoutBehavior

Type
Class
Namespace
craft\behaviors
Inherits
craft\behaviors\FieldLayoutBehavior » yii\base\Behavior (opens new window) » yii\base\BaseObject (opens new window)
Implements
yii\base\Configurable (opens new window)
Since
3.0.0

Field Layout behavior.

View source (opens new window)

# Public Properties

# elementType

Type
string (opens new window), null (opens new window)
Default value
null

The element type that the field layout will be associated with

View source (opens new window)

# fieldLayout

Type
craft\models\FieldLayout
Default value
null

View source (opens new window)

# fieldLayoutId

Type
integer (opens new window)
Default value
null

View source (opens new window)

# fields

Type
craft\base\FieldInterface[]
Default value
null

View source (opens new window)

# idAttribute

Type
string (opens new window), null (opens new window)
Default value
null

The attribute on the owner that holds the field layout ID

View source (opens new window)

# Public Methods

Method Description
__call() (opens new window) Calls the named method which is not a class method.
__construct() (opens new window) Constructor.
__get() (opens new window) Returns the value of an object property.
__isset() (opens new window) Checks if a property is set, i.e. defined and not null.
__set() (opens new window) Sets value of an object property.
__unset() (opens new window) Sets an object property to null.
attach() (opens new window) Attaches the behavior object to the component.
canGetProperty() (opens new window) Returns a value indicating whether a property can be read.
canSetProperty() (opens new window) Returns a value indicating whether a property can be set.
className() (opens new window) Returns the fully qualified name of this class.
detach() (opens new window) Detaches the behavior object from the component.
events() (opens new window) Declares event handlers for the owner (opens new window)'s events.
getFieldLayout() Returns the owner's field layout.
getFieldLayoutId() Returns the owner's field layout ID.
getFields() Returns the fields associated with the owner's field layout.
hasMethod() (opens new window) Returns a value indicating whether a method is defined.
hasProperty() (opens new window) Returns a value indicating whether a property is defined.
init() Initializes the object.
setFieldLayout() Sets the owner's field layout.
setFieldLayoutId() Sets the owner's field layout ID.
setFields() Sets the fields associated with the owner's field layout

# getFieldLayout()

Returns the owner's field layout.

View source (opens new window)

Returns

craft\models\FieldLayout

Throws

# getFieldLayoutId()

Returns the owner's field layout ID.

View source (opens new window)

Returns

integer (opens new window)

Throws

# getFields()

Returns the fields associated with the owner's field layout.

View source (opens new window)

Returns

craft\base\FieldInterface[]

# init()

Initializes the object.

This method is invoked at the end of the constructor after the object is initialized with the given configuration.

View source (opens new window)

Throws

# setFieldLayout()

Sets the owner's field layout.

View source (opens new window)

Arguments

# setFieldLayoutId()

Sets the owner's field layout ID.

View source (opens new window)

Arguments

# setFields()

Sets the fields associated with the owner's field layout

View source (opens new window)

Arguments