public function GroupTypeUIController::operationForm in Group 7
Builds the operation form.
Overrides EntityDefaultUIController::operationForm
File
- classes/
group_type.ui_controller.inc, line 133 - Defines the Entity API UI class for group types.
Class
- GroupTypeUIController
- UI class for group types.
Code
public function operationForm($form, &$form_state, $group_type, $op) {
if ($op == 'delete') {
$form['info'] = array(
'#markup' => t('By deleting this group type you will delete all groups of that type, including their content.'),
'#suffix' => '<br />',
);
$message = 'Are you sure you want to delete the group type %label and all of its groups?';
$replace = array(
'%label' => entity_label('group_type', $group_type),
);
return confirm_form($form, t($message, $replace), $this->path, NULL, t('Delete'));
}
// Call parent method for other operations.
return parent::operationForm($form, $form_state, $group_type, $op);
}