class RestoreAction

Generic restore action to restore an archived item to draft

Methods

static array
restore(Object $item)

Returns a message which notifies the user of a successful restoration and if anything has changed

static array
getRestoreMessage($originalItem, $restoredItem, $changedLocation = false)

Returns a message which notifies the user of a successful restoration and if anything has changed

static bool
shouldRestoreToRoot($record)

Determines whether this record can be restored to it's original location

Details

at line 22
static array restore(Object $item)

Returns a message which notifies the user of a successful restoration and if anything has changed

Parameters

Object $item

Return Value

array $message

Exceptions

ValidationException if the record cannot be restored

at line 86
static array getRestoreMessage($originalItem, $restoredItem, $changedLocation = false)

Returns a message which notifies the user of a successful restoration and if anything has changed

Parameters

$originalItem
$restoredItem
$changedLocation

Return Value

array $message

at line 157
static bool shouldRestoreToRoot($record)

Determines whether this record can be restored to it's original location

Parameters

$record

Return Value

bool