/** * {@inheritdoc} */ 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; }