function path_breadcrumbs_ui_delete_form in Path Breadcrumbs 7.2
Same name and namespace in other branches
- 7.3 path_breadcrumbs_ui/path_breadcrumbs_ui.module \path_breadcrumbs_ui_delete_form()
Form for deletion or revert path breadcrumbs from database.
_state
Parameters
$form:
$path_breadcrumbs: Object with path breadcrumb params.
Return value
array
1 string reference to 'path_breadcrumbs_ui_delete_form'
- path_breadcrumbs_ui_menu in path_breadcrumbs_ui/
path_breadcrumbs_ui.module - Implements hook_menu().
File
- path_breadcrumbs_ui/
path_breadcrumbs_ui.module, line 1228 - Provide user interface for CRUD operations with path breadcrumbs.
Code
function path_breadcrumbs_ui_delete_form($form, $form_state, $path_breadcrumbs) {
$form['machine_name'] = array(
'#type' => 'value',
'#value' => $path_breadcrumbs->machine_name,
);
if ($path_breadcrumbs->is_overwritten) {
$form['message'] = array(
'#markup' => t('Are you sure that you want to revert %name from database?', array(
'%name' => $path_breadcrumbs->name,
)),
);
}
else {
$form['message'] = array(
'#markup' => t('Are you sure that you want to delete %name from database?', array(
'%name' => $path_breadcrumbs->name,
)),
);
}
$form['actions'] = array(
'#type' => 'actions',
);
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => $path_breadcrumbs->is_overwritten ? t('Revert') : t('Delete'),
);
$form['actions']['cancel'] = array(
'#type' => 'submit',
'#value' => t('Cancel'),
);
return $form;
}