public function getTaskResource(\core_kernel_classes_Resource $resource)
    {
        $tasksRootClass = $this->getClass(Task::TASK_CLASS);
        $taskResources = $tasksRootClass->searchInstances([Task::PROPERTY_LINKED_RESOURCE => $resource->getUri()]);

        return empty($taskResources) ? null : current($taskResources);
    }
public function getTaskResource(\core_kernel_classes_Resource $resource)
    {
        $tasksRootClass = $this->getClass(Task::TASK_CLASS);
        $taskResources = $tasksRootClass->searchInstances([Task::PROPERTY_LINKED_RESOURCE => $resource->getUri()]);

        return empty($taskResources) ? null : current($taskResources);
    }
public function getTaskResource ( \ core_kernel_classes_Resource $ resource ) { $ tasksRootClass = $ this -> getClass ( Task :: TASK_CLASS ) ; $ taskResources = $ tasksRootClass -> searchInstances ( [ Task :: PROPERTY_LINKED_RESOURCE => $ resource -> getUri ( ) ] ) ; return empty ( $ taskResources ) ? null : current ( $ taskResources ) ; }
Get resource from rdf storage which represents task in the task queue by linked resource
Returns null if there is no task linked to given resource

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 null|\core_kernel_classes_Resource
Get resource from rdf storage which represents task in the task queue by linked resource Returns null if there is no task linked to given resource