You are here

public function GroupUIController::operationForm in Group 7

Builds the operation form.

Overrides the default to only allow the deletion of groups.

Overrides EntityDefaultUIController::operationForm

File

classes/group.ui_controller.inc, line 155
Defines the Entity API UI class for groups.

Class

GroupUIController
UI class for groups.

Code

public function operationForm($form, &$form_state, $group, $op) {
  if ($op == 'delete') {
    $form['info'] = array(
      '#markup' => t('By deleting this group you will delete all of its subgroups and content as well.'),
      '#suffix' => '<br />',
    );
    $message = 'Are you sure you want to delete the group %label?';
    $replace = array(
      '%label' => $group
        ->label(),
    );
    return confirm_form($form, t($message, $replace), "group/{$group->gid}", NULL, t('Delete'));
  }
  drupal_not_found();
  exit;
}