public function toArray()
    {
        $result = parent::toArray();

        $result['category'] = $this->taskLogService->getCategoryForTask($this->getTaskName());

        return $result;
    }
public function toArray()
    {
        $result = parent::toArray();

        $result['category'] = $this->taskLogService->getCategoryForTask($this->getTaskName());

        return $result;
    }
public function toArray ( ) { $ result = parent :: toArray ( ) ; $ result [ 'category' ] = $ this -> taskLogService -> getCategoryForTask ( $ this -> getTaskName ( ) ) ; return $ result ; }
Add category to the result. Required by our frontend.

@return array
Add category to the result . Required by our frontend .