public function ClientsConnectionHandlerEntityController::delete in Web Service Clients 7.3
Implements EntityAPIControllerInterface.
Takes care of deleting stored credentials when connections are deleted.
Parameters
$transaction: Optionally a DatabaseTransaction object to use. Allows overrides to pass in their transaction object.
Overrides EntityAPIControllerExportable::delete
File
- includes/
clients.controller.inc, line 158 - Provides a controller building upon the Entity exportable controller but providing features for handler objects.
Class
- ClientsConnectionHandlerEntityController
- Controller class for Connections.
Code
public function delete($ids, DatabaseTransaction $transaction = NULL) {
$connections = entity_load('clients_connection', $ids);
foreach ($connections as $connection) {
$credentials_storage_plugin = $connection
->get_credentials_storage_plugin();
$credentials_storage_plugin
->credentialsDelete($connection);
}
parent::delete($ids, $transaction);
}