aboutsummaryrefslogtreecommitdiff
path: root/model/Overview.php
blob: 03ef8b46724327667cb70f38bed7408322bf5dac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php

class Overview extends ModelBase
{
	public function getGroups() {
		$groups = array();

		foreach($this->get('OVERVIEW.GROUPS') as $group => $rooms)
		{
			foreach($rooms as $room)
			{
				try {
					$groups[$group][] = new Room($room);
				}
				catch(NotFoundException $e)
				{
					// just ignore unknown rooms
					continue;
				}
			}
		}

		return $groups;
	}
}