main/core/Repository/ResourceRightsRepository.php
public function findRecursiveByResource(ResourceNode $resource)
    {
        $dql = "
            SELECT rights, role, resource
            FROM Claroline\CoreBundle\Entity\Resource\ResourceRights rights
            JOIN rights.resourceNode resource
            JOIN rights.role role
            WHERE resource.path LIKE :path
        ";

        $query = $this->_em->createQuery($dql);
        $query->setParameter('path', $resource->getPath().'%');

        return $query->getResult();
    }
public function findRecursiveByResource(ResourceNode $resource)
    {
        $dql = "
            SELECT rights, role, resource
            FROM Claroline\CoreBundle\Entity\Resource\ResourceRights rights
            JOIN rights.resourceNode resource
            JOIN rights.role role
            WHERE resource.path LIKE :path
        ";

        $query = $this->_em->createQuery($dql);
        $query->setParameter('path', $resource->getPath().'%');

        return $query->getResult();
    }
public function findRecursiveByResource ( ResourceNode $ resource ) { $ dql = "
            SELECT rights, role, resource
            FROM Claroline\CoreBundle\Entity\Resource\ResourceRights rights
            JOIN rights.resourceNode resource
            JOIN rights.role role
            WHERE resource.path LIKE :path
        " ; $ query = $ this -> _em -> createQuery ( $ dql ) ; $ query -> setParameter ( 'path' , $ resource -> getPath ( ) . '%' ) ; return $ query -> getResult ( ) ; }
Returns all the resource rights of a resource and its descendants.

@param ResourceNode $resource

@return array[ResourceRights]
Returns all the resource rights of a resource and its descendants .