You are here

public function WorkflowController::delete in Workflow 7.2

Overridden to care about reverted entities.

Overrides EntityAPIControllerExportable::delete

File

includes/Entity/Workflow.php, line 756
Contains workflow\includes\Entity\Workflow. Contains workflow\includes\Entity\WorkflowController.

Class

WorkflowController
Implements a controller class for Workflow.

Code

public function delete($ids, DatabaseTransaction $transaction = NULL) {

  // @todo: replace WorkflowController::delete() with parent.
  // @todo: throw error if not workflow->isDeletable().
  foreach ($ids as $wid) {
    if ($workflow = workflow_load($wid)) {
      $workflow
        ->delete();
    }
  }
  $this
    ->resetCache();
}