webCOMAND

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

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();