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.
Public Properties ​
Property | Description |
---|---|
creator | craft\elements\User, null |
creatorId | integer, null – The creator’s ID |
owner | craft\base\ElementInterface |
source | craft\base\ElementInterface, null |
sourceId | integer |
creator
​
- Type
- craft\elements\User, null
- Default value
null
creatorId
​
The creator’s ID
owner
​
- Type
- craft\base\ElementInterface
- Default value
null
source
​
- Type
- craft\base\ElementInterface, null
- Default value
null
- Access
- Read-only
sourceId
​
- Type
- integer
- Default value
null
- Access
- Read-only
- Since
- 3.7.0
Public Methods ​
Method | Description |
---|---|
__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.
Returns ​
getSource()
​
DEPRECATED
Deprecated in 3.2.9. Use craft\base\ElementInterface::getCanonical() instead.
Returns the draft/revision’s source element.
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.
Returns ​
setCreator()
​
- Since
- 3.5.0
Sets the draft's creator.
Arguments ​
$creator
(craft\elements\User, null)