You are here

public function GroupUIController::applyOperation in Group 7

Applies an operation to the given entity.

Overrides the default to only allow the deletion of groups.

Overrides EntityDefaultUIController::applyOperation

File

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

Class

GroupUIController
UI class for groups.

Code

public function applyOperation($op, $group) {
  if ($op == 'delete') {
    $title = $group
      ->label();
    $group
      ->delete();
    watchdog('group', 'Deleted %title.', array(
      '%title' => $title,
    ));
    return t('Deleted %title.', array(
      '%title' => $title,
    ));
  }
  return FALSE;
}