backend_task
Allows adding custom content to the task-viewing screen.
Teamwork
Input (passed by reference)
$params['task'] object Instance of the
tasksTask class corresponding to the task being viewed.
… your plugin code …
Output
{$backend_task.before_header}
Custom HTML code to be used above the top block.
{$backend_task.header}
Custom HTML code to be used at the bottom of the top block inside the
<header> element.{$backend_task.after_header}
Custom HTML code to be used below the top block.
{$backend_task.before_description}
Custom HTML code to be used above the task description.
{$backend_task.description}
Custom HTML code to be used at the bottom of the block with the task description.
{$backend_task.after_description}
Custom HTML code to be used below the task description.
{$backend_task.before_attachments}
Custom HTML code to be used above the list of attached files.
{$backend_task.attachments}
Custom HTML code to be used at the bottom of the block with attached files.
{$backend_task.after_attachments}
Custom HTML code to be used below the list of attached files.
{$backend_task.before_buttons}
Custom HTML code to be used above the task action buttons.
{$backend_task.buttons}
Custom HTML code to be used at the bottom of the block with action buttons.
{$backend_task.after_buttons}
Custom HTML code to be used below the task action buttons.
{$backend_task.before_hidden_block}
Custom HTML code to be used above the list of comments to the task.
{$backend_task.hidden_block}
Custom HTML code to be used at the bottom of the block with comments.
{$backend_task.after_hidden_block}
Custom HTML code to be used below the list of comments to the task.
Teamwork
Plugin code example
PHP
public function backendTask($params)
{
/** @var tasksTask */
$task = $params['task'];
// Get assigned user's object to work with.
$task->getAssignedContact();
return [
'before_header' => 'Custom content above the header',
'header' => 'Custom content in the header',
'after_header' => 'Custom content below the header',
'before_buttons' => 'Custom content above action buttons',
'buttons' => 'Custom content in the action buttons block',
'after_buttons' => 'Custom content below action buttons',
'before_description' => 'Custom content above the description',
'description' => 'Custom content in the description block',
'after_description' => 'Custom content below the description',
'before_attachments' => 'Custom content above attachments',
'attachments' => 'Custom content in the attachments block',
'after_attachments' => 'Custom content below attachments',
'before_hidden_block' => 'Custom content above the comments block',
'hidden_block' => 'Custom content in the comments block',
'after_hidden_block' => 'Custom content below the comments block',
];
}









