function node_delete_confirm

Page callback: Form constructor for node deletion confirmation form.

Parameters

object $node: A node object.

Return value

array A form array.

See also

node_delete_confirm_submit()

node_menu()

1 string reference to 'node_delete_confirm'
node_menu in drupal/core/modules/node/node.module
Implements hook_menu().

File

drupal/core/modules/node/node.pages.inc, line 213
Callbacks for adding, editing, and deleting content and managing revisions.

Code

function node_delete_confirm($form, &$form_state, $node) {

  // Always provide entity id in the same form key as in the entity edit form.
  $form['nid'] = array(
    '#type' => 'value',
    '#value' => $node->nid,
  );
  return confirm_form($form, t('Are you sure you want to delete %title?', array(
    '%title' => $node
      ->label(),
  )), 'node/' . $node->nid, t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}