getID()) {
// raise an error
throw new RuntimeException('Could not load task record object.', 404);
}
// get the current area/project ID
$areaId = $task->getAreaID() ?: $data['area_id'] ?? 0;
// get the current task area object wrapper
$taskArea = VBOTaskArea::getRecordInstance($areaId);
// inject current area in task registry wrapper
$task->setArea($taskArea);
// get the task area driver
$taskDriver = $taskManager->getDriverInstance($taskArea->getType(), [$taskArea]);
// get the current filters
$filters = (array) ($data['filters'] ?? []);
// get VBO application
$vbo_app = VikBooking::getVboApplication();
// load visual editor assets
$vbo_app->loadVisualEditorAssets();
if (!empty($data['task_id'])) {
// fetch task activities history
$history = (new VBOHistoryModelDatabase(
new VBOTaskHistoryContext((int) $data['task_id'])
))->getItems();
} else {
$history = [];
}
?>