kanban_status_tasks

Allows adding custom content to the task cells in the Kanban section.

Teamwork

Input (passed by reference)

$params['filters'] array Set up task filters as an array with the following keys:
$params['filters']['project_id'] int|null Project ID.
$params['filters']['assigned_contact_id'] int|null Assigned user ID.
$params['filters']['milestone_id'] int|null Milestone ID.
$params['filters']['tag'] string|null Tag name.
$params['tasks'] array Task list. Each list item is an instance of the tasksTask corresponding to one of the tasks.
… your plugin code …

Output

$output
Array of custom HTML code snippets which must be added to certain blocks within task cells. Array keys are task IDs. The values are sub-arrays with the following keys:
[task_id]['after_body'] string Custom HTML code to be used at the bottom of a task cell.
Teamwork

Plugin code example

PHP

public function kanbanStatusTasks($params)
{
    // $tasks = $params['tasks'];
    // $filters = $params['filters'];

    return [
        1 => [
            'after_body' => 'Custom content to be displayed for task #1.',
        ],
        42 => [
            'after_body' => 'Custom content to be displayed for task #42.',
        ],
    ];
}