You are here

function relation_ui_delete_confirm in Relation 7

Menu callback: ask for confirmation of relation deletion.

1 string reference to 'relation_ui_delete_confirm'
relation_ui_menu in ./relation_ui.module
Implements hook_menu().

File

./relation_ui.module, line 795
Provide administration interface for relation type bundles.

Code

function relation_ui_delete_confirm($form, &$form_state, $relation) {
  $form['#relation'] = $relation;

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