Create a task item for this task and the given job item.
\Drupal\tmgmt\JobItemInterface $job_item: The job item.
Overrides LocalTaskInterface::addTaskItem
public function addTaskItem(JobItemInterface $job_item) {
// Save the task to get an id.
if ($this
->isNew()) {
$this
->save();
}
$local_task = LocalTaskItem::create(array(
'tltid' => $this
->id(),
'tjiid' => $job_item
->id(),
));
$local_task
->save();
return $local_task;
}