public function OAuth2ServerScopeUIController::applyOperation in OAuth2 Server 7
Overrides EntityDefaultUIController::overviewTableRow().
Overrides EntityDefaultUIController::applyOperation
File
- includes/
oauth2_server.scope_admin.inc, line 139 - Admin UI for scopes.
Class
- OAuth2ServerScopeUIController
- UI controller.
Code
public function applyOperation($op, $entity) {
// If the default scope is about to be deleted, reset the server setting.
if ($op == 'delete') {
$server = oauth2_server_load(arg(4));
if ($server && $server->settings['default_scope'] == $entity->name) {
$server->settings['default_scope'] = '';
$server
->save();
}
}
return parent::applyOperation($op, $entity);
}