function organigrams_form_confirm_delete_organigrams in Organigrams 7
Confirm organigram deletion form.
Parameters
array $form: The form being used to edit the node.
array $form_state: The form state array.
object $organigram: The object to delete.
Return value
mixed Renderable array containing a form.
1 string reference to 'organigrams_form_confirm_delete_organigrams'
- organigrams_menu in ./
organigrams.module - Implements hook_menu().
File
- ./
organigrams.admin.inc, line 429 - Defines the administration forms for managing organigrams.
Code
function organigrams_form_confirm_delete_organigrams($form, &$form_state, $organigram) {
// Always provide entity id in the same form key as in the entity edit form.
$form['oid'] = array(
'#type' => 'value',
'#value' => $organigram->oid,
);
// Add organigram to the form.
$form['#organigram'] = $organigram;
$form['type'] = array(
'#type' => 'value',
'#value' => 'organigram',
);
$form['name'] = array(
'#type' => 'value',
'#value' => $organigram->name,
);
return confirm_form($form, t('Are you sure you want to delete the organigram %name?', array(
'%name' => $organigram->name,
)), 'admin/structure/organigrams', t('Deleting an organigram will delete all the organigram items in it. This action cannot be undone.'), t('Delete'), t('Cancel'));
}