コード例 #1
0
 /**
  * Creates a combination input item which allows you to type in a room name.
  */
 protected function createRoomFormItem()
 {
     // Room Name
     $room_comb = new ilCombinationInputGUI($this->lng->txt("rep_robj_xrs_room"), "room");
     $room_name_input = new ilRoomSharingTextInputGUI("", "room_name");
     $room_name_input->setMaxLength(14);
     $room_name_input->setSize(14);
     $room_comb->addCombinationItem("room_name", $room_name_input, $this->lng->txt("rep_robj_xrs_room_name"));
     $this->addFilterItem($room_comb);
     $room_comb->readFromSession();
     // get the value that was submitted
     $this->filter["room"] = $room_comb->getValue();
 }
 private function createAttributeFormItem()
 {
     $attributes = $this->bookings->getAllAttributes();
     foreach ($attributes as $room_attribute) {
         // setup an ilCombinationInputGUI for the room attributes
         $room_attribute_comb = new ilCombinationInputGUI($room_attribute, "attribute_" . $room_attribute);
         $room_attribute_input = new ilRoomSharingTextInputGUI("", "attribute_" . $room_attribute . "_value");
         $room_attribute_input->setMaxLength(14);
         $room_attribute_input->setSize(14);
         $room_attribute_comb->addCombinationItem("amount", $room_attribute_input, $this->lng->txt("rep_robj_xrs_value"));
         $this->addFilterItem($room_attribute_comb);
         $room_attribute_comb->readFromSession();
         $this->filter["attributes"][$room_attribute] = $room_attribute_comb->getValue();
     }
 }
コード例 #3
0
 /**
  * Creates the input item for the room name input.
  */
 private function createRoomFormItem()
 {
     $room_name_input = new ilRoomSharingTextInputGUI($this->lng->txt("rep_robj_xrs_room"), "room_name");
     $room_name_input->setParent($this->search_form);
     $room_name_input->setMaxLength(14);
     $room_name_input->setSize(14);
     $room_get_value = $_GET["room"];
     //if the user was redirected from the room list, set the value for the room accordingly
     if ($room_get_value) {
         $room_name_input->setValue($room_get_value);
     } else {
         $room_name_input->readFromSession();
     }
     return $room_name_input;
 }