- ⌂ cObject
- Methods
- Constructor
- add_variant()
- approve()
- as_array()
- can_add_variant()
- can_delete_variant()
- can_edit_variant()
- can_reorder_variant()
- clone()
- delete()
- edit_variant()
- enum()
- get_active_object()
- get_all_variants()
- get_attributes()
- get_dimensions()
- get_dimension_with()
- get_parent()
- get_primary_cpath()
- get_variant()
- Keywords()
- lock_object()
- reload_data()
- repo()
- revert()
- save()
- store()
- unlock_object()
- update_from_array()
- validate()
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
- $options - See approve() options.
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