public function getReportByLinkedResource(\core_kernel_classes_Resource $resource)
    {
        $taskResource = $this->getTaskResource($resource);

        if ($taskResource !== null) {
            $report = $taskResource->getOnePropertyValue($this->getProperty(Task::PROPERTY_REPORT));

            if ($report) {
                $report = Report::jsonUnserialize($report->literal);
            } else {
                $status = $this->getTaskLog()->getStatus($taskResource->getUri());
                $msg = __('Task is in \'%s\' state', $status);

                $report = $status == TaskLogInterface::STATUS_FAILED
                    ? Report::createFailure($msg)
                    : Report::createInfo($msg);
            }
        } else {
            $report = Report::createFailure(__('Resource is not the task placeholder'));
        }

        return $report;
    }
public function getReportByLinkedResource(\core_kernel_classes_Resource $resource)
    {
        $taskResource = $this->getTaskResource($resource);

        if ($taskResource !== null) {
            $report = $taskResource->getOnePropertyValue($this->getProperty(Task::PROPERTY_REPORT));

            if ($report) {
                $report = Report::jsonUnserialize($report->literal);
            } else {
                $status = $this->getTaskLog()->getStatus($taskResource->getUri());
                $msg = __('Task is in \'%s\' state', $status);

                $report = $status == TaskLogInterface::STATUS_FAILED
                    ? Report::createFailure($msg)
                    : Report::createInfo($msg);
            }
        } else {
            $report = Report::createFailure(__('Resource is not the task placeholder'));
        }

        return $report;
    }
public function getReportByLinkedResource ( \ core_kernel_classes_Resource $ resource ) { $ taskResource = $ this -> getTaskResource ( $ resource ) ; if ( $ taskResource !== null ) { $ report = $ taskResource -> getOnePropertyValue ( $ this -> getProperty ( Task :: PROPERTY_REPORT ) ) ; if ( $ report ) { $ report = Report :: jsonUnserialize ( $ report -> literal ) ; } else { $ status = $ this -> getTaskLog ( ) -> getStatus ( $ taskResource -> getUri ( ) ) ; $ msg = __ ( 'Task is in \'%s\' state' , $ status ) ; $ report = $ status == TaskLogInterface :: STATUS_FAILED ? Report :: createFailure ( $ msg ) : Report :: createInfo ( $ msg ) ; } } else { $ report = Report :: createFailure ( __ ( 'Resource is not the task placeholder' ) ) ; } return $ report ; }
It will be deprecated once we have the general GUI for displaying different info of a task for the user.

@deprecated

@param \core_kernel_classes_Resource $resource
@return Report
It will be deprecated once we have the general GUI for displaying different info of a task for the user .