ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilObjRemoteGlossaryGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once('Services/WebServices/ECS/classes/class.ilRemoteObjectBaseGUI.php');
5 
19 {
20  public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
21  {
22  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
23 
24  $this->lng->loadLanguageModule('rglo');
25  // $this->lng->loadLanguageModule('glo');
26  }
27 
28  public function getType()
29  {
30  return 'rglo';
31  }
32 
33  protected function addCustomInfoFields(ilInfoScreenGUI $a_info)
34  {
35  $a_info->addProperty($this->lng->txt('ecs_availability'), $this->availabilityToString());
36  }
37 
38  protected function availabilityToString()
39  {
40  switch ($this->object->getAvailabilityType()) {
42  return $this->lng->txt('offline');
43 
45  return $this->lng->txt('online');
46  }
47  return '';
48  }
49 
50  protected function addCustomEditForm(ilPropertyFormGUI $a_form)
51  {
52  $radio_grp = new ilRadioGroupInputGUI($this->lng->txt('ecs_availability'), 'activation_type');
53  $radio_grp->setValue($this->object->getAvailabilityType());
54  $radio_grp->setDisabled(true);
55 
56  $radio_opt = new ilRadioOption($this->lng->txt('offline'), ilObjRemoteGlossary::ACTIVATION_OFFLINE);
57  $radio_grp->addOption($radio_opt);
58 
59  $radio_opt = new ilRadioOption($this->lng->txt('online'), ilObjRemoteGlossary::ACTIVATION_ONLINE);
60  $radio_grp->addOption($radio_opt);
61 
62  $a_form->addItem($radio_grp);
63  }
64 }
This class represents an option in a radio group.
Class ilInfoScreenGUI.
This class represents a property form user interface.
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a property in a property form.
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
addCustomEditForm(ilPropertyFormGUI $a_form)
addProperty($a_name, $a_value, $a_link="")
add a property to current section
addCustomInfoFields(ilInfoScreenGUI $a_info)