tmgmt_local.controller.task.inc in Translation Management Tool 7
Contains the task controller.
File
translators/tmgmt_local/controller/tmgmt_local.controller.task.incView source
<?php
/**
* @file
* Contains the task controller.
*/
/**
* Controller class for the local task entity.
*
* @ingroup tmgmt_local_task
*/
class TMGMTLocalTaskController extends EntityAPIController {
/**
* {@inheritdoc}
*/
public function save($entity, DatabaseTransaction $transaction = NULL) {
$entity->changed = REQUEST_TIME;
return parent::save($entity, $transaction);
}
/**
* {@inheritdoc}
*/
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']));
}
}
}
Classes
Name![]() |
Description |
---|---|
TMGMTLocalTaskController | Controller class for the local task entity. |