src/Models/Repository/RoleHierarchyRepository.php
private function getChildIds($parentIds)
    {
        $qb = $this->createQueryBuilder('roleHierarchy');

        $qb->select('roleHierarchy.childRoleId')
            ->where($qb->expr()->in( 'roleHierarchy.parentRoleId', $parentIds))
            ->indexBy('roleHierarchy', 'roleHierarchy.childRoleId');

        $childRoleIds =  $qb->getQuery()->getArrayResult();

        return array_keys($childRoleIds);
    }
private function getChildIds($parentIds)
    {
        $qb = $this->createQueryBuilder('roleHierarchy');

        $qb->select('roleHierarchy.childRoleId')
            ->where($qb->expr()->in( 'roleHierarchy.parentRoleId', $parentIds))
            ->indexBy('roleHierarchy', 'roleHierarchy.childRoleId');

        $childRoleIds =  $qb->getQuery()->getArrayResult();

        return array_keys($childRoleIds);
    }
private function getChildIds ( $ parentIds ) { $ qb = $ this -> createQueryBuilder ( 'roleHierarchy' ) ; $ qb -> select ( 'roleHierarchy.childRoleId' ) -> where ( $ qb -> expr ( ) -> in ( 'roleHierarchy.parentRoleId' , $ parentIds ) ) -> indexBy ( 'roleHierarchy' , 'roleHierarchy.childRoleId' ) ; $ childRoleIds = $ qb -> getQuery ( ) -> getArrayResult ( ) ; return array_keys ( $ childRoleIds ) ; }
Returns array of child role ids for given parent role ids
@param integer[] $parentIds
@return integer[]
@throws \Doctrine\ORM\Query\QueryException
Returns array of child role ids for given parent role ids