You are here

function deploy_node_operations in Deploy - Content Staging 7.3

Same name and namespace in other branches
  1. 7.2 deploy.core.inc \deploy_node_operations()

Implements hook_node_operations().

Related topics

File

./deploy.core.inc, line 96
Deploy module functions for core entities.

Code

function deploy_node_operations() {
  $operations = array();
  $options = deploy_manager_plan_get_options();
  foreach ($options as $plan_name => $plan_title) {
    $operations['deploy:add:' . $plan_name] = array(
      'label' => $plan_title,
      'callback' => 'deploy_node_operation_add_to_managed_plan',
      'callback arguments' => array(
        'plan_name' => $plan_name,
      ),
    );
    $operations['deploy:delete:' . $plan_name] = array(
      'label' => $plan_title,
      'callback' => 'deploy_node_operation_delete_from_managed_plan',
      'callback arguments' => array(
        'plan_name' => $plan_name,
      ),
    );
  }
  return $operations;
}