class RestoreAction (View source)

Generic restore action to restore an archived item to draft

Methods

public static 
array
restore(object $item)

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

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

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

public static 
bool
shouldRestoreToRoot(mixed $record)

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

Details

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

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

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

Parameters

mixed $originalItem
mixed $restoredItem ,
bool $changedLocation

Return Value

array $message

static bool shouldRestoreToRoot(mixed $record)

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

Parameters

mixed $record

Return Value

bool