You are here

function deploy_manager_action_delete_from_plan in Deploy - Content Staging 7.3

Same name and namespace in other branches
  1. 7.2 deploy.rules.inc \deploy_manager_action_delete_from_plan()

Action callback for the "Remove from deploy plan" action.

File

./deploy.rules.inc, line 126
Rules implementations.

Code

function deploy_manager_action_delete_from_plan($plan_name, $entity_wrapper) {
  if (!deploy_manager_plan_load($plan_name)) {
    watchdog('deploy manager', 'Attempted to remove from a non-existent deploy plan or one that cannot be arbitrarily removed from: @plan', array(
      '@plan' => $plan_name,
    ), WATCHDOG_ERROR);
    return;
  }
  $entity_type = $entity_wrapper
    ->type();
  $entity = $entity_wrapper
    ->value();
  deploy_manager_delete_from_plan($plan_name, $entity_type, $entity);
}