plugin/competency/Repository/ObjectiveRepository.php
public function findByGroup(Group $group)
    {
        return $this->createQueryBuilder('o')
            ->select('o.id', 'o.name')
            ->join('o.groups', 'g')
            ->where('g = :group')
            ->groupBy('o.id')
            ->setParameter(':group', $group)
            ->getQuery()
            ->getArrayResult();
    }
public function findByGroup(Group $group)
    {
        return $this->createQueryBuilder('o')
            ->select('o.id', 'o.name')
            ->join('o.groups', 'g')
            ->where('g = :group')
            ->groupBy('o.id')
            ->setParameter(':group', $group)
            ->getQuery()
            ->getArrayResult();
    }
public function findByGroup ( Group $ group ) { return $ this -> createQueryBuilder ( 'o' ) -> select ( 'o.id' , 'o.name' ) -> join ( 'o.groups' , 'g' ) -> where ( 'g = :group' ) -> groupBy ( 'o.id' ) -> setParameter ( ':group' , $ group ) -> getQuery ( ) -> getArrayResult ( ) ; }
Returns an array representation of the objectives assigned to a group.

@param Group $group

@return array
Returns an array representation of the objectives assigned to a group .