function oa_clone in Open Atrium Clone 7.2
Clones a node using the 'clone' module.
This is just a shortcut for calling oa_clone_prepare() and then oa_clone_save().
Parameters
object|int $original_node: The node object or nid that we are cloning.
int $space_nid: (Optional) The nid of the Space to add this node to.
int $section_nid: (Optional) The nid of the Section to add this node to.
boolean $bypass_access_check: (Optional) If set to TRUE, the access check will be bypassed.
Return value
object|NULL The new node object that was created or NULL if the user doesn't have access to clone it.
See also
3 calls to oa_clone()
- oa_clone_batch_clone_orphan_content in ./
oa_clone.module - Callback for cloning all the content in a section.
- oa_clone_batch_clone_section_content in ./
oa_clone.module - Callback for cloning all the content in a section.
- _oa_clone_batch_space in ./
oa_clone.module - Recursively clone a Space while setting up a batch for cloning content.
File
- ./
oa_clone.module, line 446
Code
function oa_clone($original_node, $space_nid = NULL, $section_nid = NULL, $bypass_access_check = FALSE) {
$node = oa_clone_prepare($original_node, $space_nid, $section_nid, $bypass_access_check);
if ($node) {
oa_clone_save($node, $original_node);
}
return $node;
}