aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}