BaseRevisionBehavior

Type
Abstract Class
Namespace
craft\behaviors
Inherits
craft\behaviors\BaseRevisionBehavior » yii\base\Behavior (opens new window) » yii\base\BaseObject (opens new window)
Implements
yii\base\Configurable (opens new window)
Extended by
craft\behaviors\DraftBehavior, craft\behaviors\RevisionBehavior
Since
3.5.0

BaseRevisionBehavior is the base implementation of draft & revision behaviors.

View source (opens new window)

# Public Properties

# creator

Type
craft\elements\User, null (opens new window)
Default value
null

View source (opens new window)

# creatorId

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

The creator’s ID

View source (opens new window)

# owner

Type
craft\base\ElementInterface
Default value
null

View source (opens new window)

# source

Type
craft\base\ElementInterface, null (opens new window)
Default value
null
Access
Read-only

View source (opens new window)

# sourceId

Default value
null

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.
getCreator() Returns the draft’s creator.
getSource() Returns the draft/revision’s source element.
getSourceId() Returns the draft/revision's source element ID.
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() (opens new window) Initializes the object.
setCreator() Sets the draft's creator.

# getCreator()

Returns the draft’s creator.

View source (opens new window)

Returns

craft\elements\User, null (opens new window)

# getSource()

DEPRECATED

Deprecated in 3.2.9. Use craft\base\ElementInterface::getCanonical() instead.

Returns the draft/revision’s source element.

View source (opens new window)

Returns

craft\base\ElementInterface, null (opens new window)

# getSourceId()

DEPRECATED

Deprecated in 3.7.0. Use craft\base\ElementInterface::getCanonicalId() instead.

Since
3.7.0

Returns the draft/revision's source element ID.

View source (opens new window)

Returns

integer (opens new window)

# setCreator()

Since
3.5.0

Sets the draft's creator.

View source (opens new window)

Arguments