plugin/competency/Repository/CompetencyAbilityRepository.php
public function countByAbility(Ability $ability)
    {
        return $this->createQueryBuilder('ca')
            ->select('COUNT(ca)')
            ->where('ca.ability = :ability')
            ->setParameter(':ability', $ability)
            ->getQuery()
            ->getSingleScalarResult();
    }
public function countByAbility(Ability $ability)
    {
        return $this->createQueryBuilder('ca')
            ->select('COUNT(ca)')
            ->where('ca.ability = :ability')
            ->setParameter(':ability', $ability)
            ->getQuery()
            ->getSingleScalarResult();
    }
public function countByAbility ( Ability $ ability ) { return $ this -> createQueryBuilder ( 'ca' ) -> select ( 'COUNT(ca)' ) -> where ( 'ca.ability = :ability' ) -> setParameter ( ':ability' , $ ability ) -> getQuery ( ) -> getSingleScalarResult ( ) ; }
Returns the number of existing associations between
competencies and a given ability.

@param Ability $ability

@return int
Returns the number of existing associations between competencies and a given ability .