You are here

function replicate_ui_replicate_item in Replicate UI 7

Callback for replicate_action_info().

File

actions/replicate.action.inc, line 24
Implements a generic entity delete action. Uses Entity API if available.

Code

function replicate_ui_replicate_item($entity, $context) {

  // account for context params so they can be passed for VBO processing
  if (isset($context['params'])) {
    $entity->action_params = $context['params'];
  }

  // Duplicate the entity and save the replica.
  replicate_entity($context['entity_type'], $entity);
}