- ⌂ 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::save()
Save is just an alias for approve() for objects with a Content Type that extends Object. See Content::save() to learn about the different behavior for objects with a Content Type that extends Content.
Save the object and its embedded objects to the repository as a draft version of the object. All saved draft versions will remain in the repository until approve() is called, which replaces all drafts saved up to the approve with a single final approved version.
Prototype
boolean save(array $options = [])
Parameters
- $options - See approve() options.
Return
TRUE if the object was approved and committed to the repository. Otherwise, FALSE.
Example
$repo = \comand::repo();
$pub_proc = $repo->new_object('PublicationProcedure');
$pub_proc->Filename = 'index.html';
$pub_proc->save();