Skip to content

BaseRevisionBehavior ​

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

BaseRevisionBehavior is the base implementation of draft & revision behaviors.

View source

Public Properties ​

PropertyDescription
creatorcraft\elements\User, null
creatorIdinteger, null – The creator’s ID
ownercraft\base\ElementInterface
sourcecraft\base\ElementInterface, null
sourceIdinteger

creator ​

Type
craft\elements\User, null
Default value
null

View source

creatorId ​

Type
integer, null
Default value
null

The creator’s ID

View source

owner ​

Type
craft\base\ElementInterface
Default value
null

View source

source ​

Type
craft\base\ElementInterface, null
Default value
null
Access
Read-only

View source

sourceId ​

Type
integer
Default value
null
Access
Read-only
Since
3.7.0

View source

Public Methods ​

MethodDescription
__call()Calls the named method which is not a class method.
__construct()Constructor.
__get()Returns the value of an object property.
__isset()Checks if a property is set, i.e. defined and not null.
__set()Sets value of an object property.
__unset()Sets an object property to null.
attach()Attaches the behavior object to the component.
canGetProperty()Returns a value indicating whether a property can be read.
canSetProperty()Returns a value indicating whether a property can be set.
className()Returns the fully qualified name of this class.
detach()Detaches the behavior object from the component.
events()Declares event handlers for the owner'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()Returns a value indicating whether a method is defined.
hasProperty()Returns a value indicating whether a property is defined.
init()Initializes the object.
setCreator()Sets the draft's creator.

getCreator() ​

Returns the draft’s creator.

View source

Returns ​

craft\elements\User, null

getSource() ​

DEPRECATED

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

Returns the draft/revision’s source element.

View source

Returns ​

craft\base\ElementInterface, null

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

Returns ​

integer

setCreator() ​

Since
3.5.0

Sets the draft's creator.

View source

Arguments ​