public function getGroupedApplications()
    {
        $organizations = $this->getEntityManager()
            ->getRepository(Organization::class)
            ->findAll();

        $applications = $this->findAll();

        usort($applications, $this->applicationSorter());
        usort($organizations, $this->organizationSorter());

        $grouped = [];
        foreach ($organizations as $org) {
            $grouped[$org->id()] = [];
        }

        foreach ($applications as $app) {
            $orgID = $app->organization() ? $app->organization()->id() : 'none';
            $grouped[$orgID][] = $app;
        }

        return $grouped;
    }
public function getGroupedApplications()
    {
        $organizations = $this->getEntityManager()
            ->getRepository(Organization::class)
            ->findAll();

        $applications = $this->findAll();

        usort($applications, $this->applicationSorter());
        usort($organizations, $this->organizationSorter());

        $grouped = [];
        foreach ($organizations as $org) {
            $grouped[$org->id()] = [];
        }

        foreach ($applications as $app) {
            $orgID = $app->organization() ? $app->organization()->id() : 'none';
            $grouped[$orgID][] = $app;
        }

        return $grouped;
    }
public function getGroupedApplications ( ) { $ organizations = $ this -> getEntityManager ( ) -> getRepository ( Organization :: class ) -> findAll ( ) ; $ applications = $ this -> findAll ( ) ; usort ( $ applications , $ this -> applicationSorter ( ) ) ; usort ( $ organizations , $ this -> organizationSorter ( ) ) ; $ grouped = [ ] ; foreach ( $ organizations as $ org ) { $ grouped [ $ org -> id ( ) ] = [ ] ; } foreach ( $ applications as $ app ) { $ orgID = $ app -> organization ( ) ? $ app -> organization ( ) -> id ( ) : 'none' ; $ grouped [ $ orgID ] [ ] = $ app ; } return $ grouped ; }
Get all applications sorted into organizations.

@return array
Get all applications sorted into organizations .