You are here

function deploy_list_multiple_delete_confirm in Deploy - Content Staging 6

Confirmation form for deploy plan item deletes.

Parameters

$form_state: FAPI form state

$items: The items tp be deleted

Return value

FAPI array

See also

deploy_list_multiple_delete_confirm()

1 call to deploy_list_multiple_delete_confirm()
deploy_list_form in ./deploy.plans.admin.inc
Display a list of all items in a specified plan.

File

./deploy.plans.admin.inc, line 204
Page handlers for deploy plan admin.

Code

function deploy_list_multiple_delete_confirm($form_state, $items) {
  $form['items'] = array(
    '#prefix' => '<ul>',
    '#suffix' => '</ul>',
    '#tree' => TRUE,
  );
  foreach ($items as $iid => $value) {
    $title = db_result(db_query('SELECT description FROM {deploy_plan_items} WHERE iid = %d', $iid));
    $form['items'][$iid] = array(
      '#type' => 'hidden',
      '#value' => $iid,
      '#prefix' => '<li>',
      '#suffix' => check_plain($title) . "</li>\n",
    );
  }
  $form['operation'] = array(
    '#type' => 'hidden',
    '#value' => 'delete',
  );
  $form['#submit'][] = 'deploy_list_multiple_delete_confirm_submit';
  return confirm_form($form, t('Are you sure you want to remove these items from the deployment plan?'), 'admin/content/node', t('This action cannot be undone.'), t('Remove all'), t('Cancel'));
}