Properties

$revisionEnabled

$revisionEnabled : boolean

Type

boolean

$objectRevisionClass

$objectRevisionClass : string

The class name of the object revision model.

Must be a fully-qualified PHP namespace and an implementation of \Charcoal\Object\ObjectRevisionInterface. Used by the model factory.

Type

string

Methods

setRevisionEnabled()

setRevisionEnabled(boolean  $enabled) : \Charcoal\Object\RevisionableInterface

Parameters

boolean $enabled

The (revision) enabled flag.

Returns

\Charcoal\Object\RevisionableInterface

Chainable

revisionEnabled()

revisionEnabled() : boolean

Returns

boolean

objectRevisionClass()

objectRevisionClass() : string

Retrieve the class name of the object revision model.

Returns

string

revisionNum()

revisionNum(integer  $revNum) : \Charcoal\Object\ObjectRevision

Parameters

integer $revNum

The revision number.

Returns

\Charcoal\Object\ObjectRevision

allRevisions()

allRevisions(callable  $callback = null) : array

Retrieves all revisions for the current objet

Parameters

callable $callback

Optional object callback.

Returns

array

revertToRevision()

revertToRevision(integer  $revNum) : boolean

Parameters

integer $revNum

The revision number to revert to.

Throws

\InvalidArgumentException

If revision number is invalid.

Returns

boolean —

Success / Failure.

modelFactory()

modelFactory() : \Charcoal\Factory\FactoryInterface

Retrieve the object model factory.

Returns

\Charcoal\Factory\FactoryInterface

setObjectRevisionClass()

setObjectRevisionClass(string  $className) : \Charcoal\Object\AbstractPropertyDisplay

Set the class name of the object revision model.

Parameters

string $className

The class name of the object revision model.

Throws

\InvalidArgumentException

If the class name is not a string.

Returns

\Charcoal\Object\AbstractPropertyDisplay —

Chainable