You are here

function hook_oa_clone_group_metadata in Open Atrium Clone 7.2

Clone metadata associated with a Space or Group.

This hook is called when cloning Space or Group, after the new node has been created but before any of it's content has been cloned. This is where your module should clone any metadata that it keeps about the Space or Group.

If you want to clone some peice of data BEFORE the Space or Group node is saved (ie. so that your data is saved with it, rather than saving again) then you should hook_clone_node_alter() instead.

Parameters

object $node: Node object representing the Space or Group that we are going to configure.

int $original_nid: The node ID of the original Space or Group we are cloning metadata from.

See also

hook_clone_node_alter()

Related topics

1 invocation of hook_oa_clone_group_metadata()
oa_clone_batch_clone_group_metadata in ./oa_clone.module
Callback for cloning Organic Groups metadata (variables, permisssions, etc).

File

./oa_clone.api.php, line 32
Contains documentation about the Open Atrium Clone module's hooks.

Code

function hook_oa_clone_group_metadata($node, $original_nid) {

  // Clone some data you are keeping about the node
  save_data_about_group($node->nid, load_data_about_group($original_nid));
}