Example #1
0
 /**
  * Delete a project group.
  * @param $groupId
  * @return b8\Http\Response\RedirectResponse
  */
 public function delete($groupId)
 {
     $this->requireAdmin();
     $group = $this->groupStore->getById($groupId);
     $this->groupStore->delete($group);
     $response = new b8\Http\Response\RedirectResponse();
     $response->setHeader('Location', PHPCI_URL . 'group');
     return $response;
 }
Example #2
0
 /**
  * Get a summary of the project groups we have, and what projects they have in them.
  * @return array
  */
 protected function getGroupInfo()
 {
     $rtn = array();
     $groups = $this->groupStore->getWhere(array(), 100, 0, array(), array('title' => 'ASC'));
     foreach ($groups['items'] as $group) {
         $thisGroup = array('title' => $group->getTitle());
         $projects = $this->projectStore->getByGroupId($group->getId());
         $thisGroup['projects'] = $projects['items'];
         $thisGroup['summary'] = $this->getSummaryHtml($thisGroup['projects']);
         $rtn[] = $thisGroup;
     }
     return $rtn;
 }