protected function returnTaskJson(TaskInterface $task, array $extraData = [])
    {
        return $this->returnJson([
            'success' => true,
            'data' => [
                'extra' => $extraData,
                'task' => $this->getTaskLogReturnData($task->getId())
            ]
        ]);
    }
protected function returnTaskJson(TaskInterface $task, array $extraData = [])
    {
        return $this->returnJson([
            'success' => true,
            'data' => [
                'extra' => $extraData,
                'task' => $this->getTaskLogReturnData($task->getId())
            ]
        ]);
    }
protected function returnTaskJson ( TaskInterface $ task , array $ extraData = [ ] ) { return $ this -> returnJson ( [ 'success' => true , 'data' => [ 'extra' => $ extraData , 'task' => $ this -> getTaskLogReturnData ( $ task -> getId ( ) ) ] ] ) ; }
Returns task data in a specific data structure required by the front-end component.

@param TaskInterface $task
@param array         $extraData
@return mixed
Returns task data in a specific data structure required by the front - end component .