plugin/competency/Repository/CompetencyRepository.php
public function findByResource(ResourceNode $resource)
    {
        return $this->createQueryBuilder('c')
            ->select('c')
            ->join('c.resources', 'r')
            ->where('r = :resource')
            ->setParameter(':resource', $resource)
            ->getQuery()
            ->getResult();
    }
public function findByResource(ResourceNode $resource)
    {
        return $this->createQueryBuilder('c')
            ->select('c')
            ->join('c.resources', 'r')
            ->where('r = :resource')
            ->setParameter(':resource', $resource)
            ->getQuery()
            ->getResult();
    }
public function findByResource ( ResourceNode $ resource ) { return $ this -> createQueryBuilder ( 'c' ) -> select ( 'c' ) -> join ( 'c.resources' , 'r' ) -> where ( 'r = :resource' ) -> setParameter ( ':resource' , $ resource ) -> getQuery ( ) -> getResult ( ) ; }
Returns the competencies associated with a resource.

@param ResourceNode $resource

@return array
Returns the competencies associated with a resource .