You are here

function log_delete_form in Log entity 7

Delete confirmation form.

Parameters

array $form: The form array.

array $form_state: The form state array.

Log $log: The log entity to delete.

Return value

array Returns a form array.

1 string reference to 'log_delete_form'
log_menu in ./log.module
Implements hook_menu().

File

./log.pages.inc, line 270
Log pages.

Code

function log_delete_form(array $form, array &$form_state, Log $log) {
  $form['log'] = array(
    '#type' => 'value',
    '#value' => $log,
  );

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