ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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  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())
41  {
43  return $this->lng->txt('offline');
44 
46  return $this->lng->txt('online');
47  }
48  return '';
49  }
50 
51  protected function addCustomEditForm(ilPropertyFormGUI $a_form)
52  {
53  $radio_grp = new ilRadioGroupInputGUI($this->lng->txt('ecs_availability'),'activation_type');
54  $radio_grp->setValue($this->object->getAvailabilityType());
55  $radio_grp->setDisabled(true);
56 
57  $radio_opt = new ilRadioOption($this->lng->txt('offline'),ilObjRemoteGlossary::ACTIVATION_OFFLINE);
58  $radio_grp->addOption($radio_opt);
59 
60  $radio_opt = new ilRadioOption($this->lng->txt('online'),ilObjRemoteGlossary::ACTIVATION_ONLINE);
61  $radio_grp->addOption($radio_opt);
62 
63  $a_form->addItem($radio_grp);
64  }
65 }
66 
67 ?>