webCOMAND

cObject::revert()

Revert does not perform any action on objects with a Content Type that does not extend Content.  In fact, it will throw an exception.  See Content::revert() to learn about the different behavior for objects with a Content Type that does extend Content.

Prototype

boolean revert(array $options = [])

Parameters

Return

TRUE if the object working copy was reverted to the latest draft or approved version in the repository.  Otherwise, FALSE.

Example

$repo = \comand::repo();
$contact = $repo->get('FROM Contact LIMIT 1');
$contact->revert(); // restore working copy