aboutsummaryrefslogtreecommitdiff
path: root/model/Room.php
diff options
context:
space:
mode:
authorMaZderMind2015-03-30 21:37:32 +0200
committerMaZderMind2015-03-30 21:37:32 +0200
commit4d638aa9fb3081742bd85c9396e9204f36a5e9f2 (patch)
tree3c78726b197ffd6582cf5ef2a772df3fe9ff7fe6 /model/Room.php
parent340e5ff295cc9ee06671e07548ac104092b5f978 (diff)
Default Tab- and Selection access
Diffstat (limited to 'model/Room.php')
-rw-r--r--model/Room.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/model/Room.php b/model/Room.php
index f9d5efe..cac01cc 100644
--- a/model/Room.php
+++ b/model/Room.php
@@ -195,8 +195,14 @@ class Room extends ModelBase
return $selections;
}
- public function createSelectionObject($selection)
+ public function createSelectionObject($selection = null)
{
+ if(!$selection)
+ {
+ $selections = $this->getSelectionNames();
+ $selection = $selections[0];
+ }
+
return new RoomSelection($this, $selection);
}
@@ -209,8 +215,14 @@ class Room extends ModelBase
return $tabs;
}
- public function createTabObject($tab)
+ public function createTabObject($tab = null)
{
+ if(!$tab)
+ {
+ $tabs = $this->getTabNames();
+ $tab = $tabs[0];
+ }
+
return new RoomTab($this, $tab);
}