You are here

public function TMGMTLocalTaskController::delete in Translation Management Tool 7

Implements EntityAPIControllerInterface.

Parameters

$transaction: Optionally a DatabaseTransaction object to use. Allows overrides to pass in their transaction object.

Overrides EntityAPIController::delete

File

translators/tmgmt_local/controller/tmgmt_local.controller.task.inc, line 26
Contains the task controller.

Class

TMGMTLocalTaskController
Controller class for the local task entity.

Code

public function delete($ids, $transaction = NULL) {
  parent::delete($ids, $transaction);
  $query = new EntityFieldQuery();
  $result = $query
    ->entityCondition('entity_type', 'tmgmt_local_task_item')
    ->propertyCondition('tltid', $ids)
    ->execute();
  if (!empty($result['tmgmt_local_task_item'])) {
    entity_delete_multiple('tmgmt_local_task_item', array_keys($result['tmgmt_local_task_item']));
  }
}