aboutsummaryrefslogtreecommitdiff
path: root/model/Overview.php
diff options
context:
space:
mode:
authorMaZderMind2016-12-10 18:22:34 +0100
committerMaZderMind2016-12-10 18:22:34 +0100
commitf6c0270d40f6730fe1e1820f2866b08792df1db6 (patch)
treef0da1effc9f55f2f75dc57fe1ba17419d559b45b /model/Overview.php
parentb227ac0ee80f6de300fed10a34e7393847227cfc (diff)
rewrite data-model so that every configuration option is accessed through the conference
Diffstat (limited to '')
-rw-r--r--model/Overview.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/model/Overview.php b/model/Overview.php
index 03ef8b4..8a467bc 100644
--- a/model/Overview.php
+++ b/model/Overview.php
@@ -1,16 +1,25 @@
<?php
-class Overview extends ModelBase
+class Overview
{
+ public function __construct(Conference $conference)
+ {
+ $this->conference = $conference;
+ }
+
+ public function getConference() {
+ return $this->conference;
+ }
+
public function getGroups() {
$groups = array();
- foreach($this->get('OVERVIEW.GROUPS') as $group => $rooms)
+ foreach($this->getConference()->get('OVERVIEW.GROUPS') as $group => $rooms)
{
foreach($rooms as $room)
{
try {
- $groups[$group][] = new Room($room);
+ $groups[$group][] = $this->getConference()->getRoom($room);
}
catch(NotFoundException $e)
{