webCOMAND

Content::revert()

Restore the working copy of this object to the latest saved/approved version (or removing the object if no saved/approve version exists yet), and release any locked fields.

Prototype

boolean revert(array $options = [])

Parameters

Return

TRUE if the working copy was restored in the repository.  Otherwise, FALSE.

Example

$repo = \comand::repo();
$contact = $repo->get_first('FROM Contact LIMIT 1');
$contact->FirstName = 'Jane';
$contact->approve();
$contact->FirstName = 'John';
$contact->store();

// revert FirstName to 'Jane'
$contact->revert();