public function AccessTokenController::delete in Access unpublished 8
Deletes an access token.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The request object.
\Drupal\access_unpublished\Entity\AccessToken $access_token: The access token to delete.
Return value
\Drupal\Core\Ajax\AjaxResponse A replace command to replace the token table.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Core\Entity\EntityStorageException
File
- src/
Controller/ AccessTokenController.php, line 87
Class
- AccessTokenController
- Controller for the access token handling.
Namespace
Drupal\access_unpublished\ControllerCode
public function delete(Request $request, AccessToken $access_token) {
$access_token
->delete();
return $this
->buildResponse($request, $access_token);
}