Adding project groups
This commit is contained in:
parent
70db830065
commit
522eaef825
18 changed files with 695 additions and 72 deletions
|
|
@ -135,15 +135,17 @@ class Application extends b8\Application
|
|||
*/
|
||||
protected function setLayoutVariables(View &$layout)
|
||||
{
|
||||
/** @var \PHPCI\Store\ProjectStore $projectStore */
|
||||
$projectStore = b8\Store\Factory::getStore('Project');
|
||||
$layout->projects = $projectStore->getWhere(
|
||||
array('archived' => (int)isset($_GET['archived'])),
|
||||
50,
|
||||
0,
|
||||
array(),
|
||||
array('title' => 'ASC')
|
||||
);
|
||||
$groups = array();
|
||||
$groupList = b8\Store\Factory::getStore('ProjectGroup')->getWhere(array(), 100, 0, array(), array('title' => 'ASC'));
|
||||
|
||||
foreach ($groupList['items'] as $group) {
|
||||
$thisGroup = array('title' => $group->getTitle());
|
||||
$projects = b8\Store\Factory::getStore('Project')->getByGroupId($group->getId());
|
||||
$thisGroup['projects'] = $projects['items'];
|
||||
$groups[] = $thisGroup;
|
||||
}
|
||||
|
||||
$layout->groups = $groups;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue