main/core/Repository/WorkspaceRepository.php
public function countNonPersonalWorkspaces($organizations = null)
    {
        $qb = $this
            ->createQueryBuilder('w')
            ->select('COUNT(w.id)')
            ->andWhere('w.personal = :personal')
            ->setParameter('personal', false);
        if (null !== $organizations) {
            $qb->join('w.organizations', 'orgas')
                ->andWhere('orgas IN (:organizations)')
                ->setParameter('organizations', $organizations);
        }

        return $qb->getQuery()->getSingleScalarResult();
    }
public function countNonPersonalWorkspaces($organizations = null)
    {
        $qb = $this
            ->createQueryBuilder('w')
            ->select('COUNT(w.id)')
            ->andWhere('w.personal = :personal')
            ->setParameter('personal', false);
        if (null !== $organizations) {
            $qb->join('w.organizations', 'orgas')
                ->andWhere('orgas IN (:organizations)')
                ->setParameter('organizations', $organizations);
        }

        return $qb->getQuery()->getSingleScalarResult();
    }
public function countNonPersonalWorkspaces ( $ organizations = null ) { $ qb = $ this -> createQueryBuilder ( 'w' ) -> select ( 'COUNT(w.id)' ) -> andWhere ( 'w.personal = :personal' ) -> setParameter ( 'personal' , false ) ; if ( null !== $ organizations ) { $ qb -> join ( 'w.organizations' , 'orgas' ) -> andWhere ( 'orgas IN (:organizations)' ) -> setParameter ( 'organizations' , $ organizations ) ; } return $ qb -> getQuery ( ) -> getSingleScalarResult ( ) ; }
Counts the non personal workspaces.

@return int
Counts the non personal workspaces .