public function index()
    {
        $this->requireAdmin();

        $groups = array();
        $groupList = $this->groupStore->getWhere(array(), 100, 0, array(), array('title' => 'ASC'));

        foreach ($groupList['items'] as $group) {
            $thisGroup = array(
                'title' => $group->getTitle(),
                'id' => $group->getId(),
            );
            $projects = b8\Store\Factory::getStore('Project')->getByGroupId($group->getId());
            $thisGroup['projects'] = $projects['items'];
            $groups[] = $thisGroup;
        }

        $this->view->groups = $groups;
    }
public function index()
    {
        $this->requireAdmin();

        $groups = array();
        $groupList = $this->groupStore->getWhere(array(), 100, 0, array(), array('title' => 'ASC'));

        foreach ($groupList['items'] as $group) {
            $thisGroup = array(
                'title' => $group->getTitle(),
                'id' => $group->getId(),
            );
            $projects = b8\Store\Factory::getStore('Project')->getByGroupId($group->getId());
            $thisGroup['projects'] = $projects['items'];
            $groups[] = $thisGroup;
        }

        $this->view->groups = $groups;
    }
public function index ( ) { $ this -> requireAdmin ( ) ; $ groups = array ( ) ; $ groupList = $ this -> groupStore -> getWhere ( array ( ) , 100 , 0 , array ( ) , array ( 'title' => 'ASC' ) ) ; foreach ( $ groupList [ 'items' ] as $ group ) { $ thisGroup = array ( 'title' => $ group -> getTitle ( ) , 'id' => $ group -> getId ( ) , ) ; $ projects = b8 \ Store \ Factory :: getStore ( 'Project' ) -> getByGroupId ( $ group -> getId ( ) ) ; $ thisGroup [ 'projects' ] = $ projects [ 'items' ] ; $ groups [ ] = $ thisGroup ; } $ this -> view -> groups = $ groups ; }
List project groups.
List project groups .