ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilObjRemoteGlossaryGUI.php
Go to the documentation of this file.
1 <?php
2 
18 declare(strict_types=1);
19 
33 {
34  public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
35  {
36  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
37 
38  $this->lng->loadLanguageModule('rglo');
39  }
40 
41  public function getType(): string
42  {
43  return 'rglo';
44  }
45 
46  protected function addCustomInfoFields(ilInfoScreenGUI $a_info): void
47  {
48  $a_info->addProperty($this->lng->txt('ecs_availability'), $this->availabilityToString());
49  }
50 
51  protected function availabilityToString()
52  {
53  switch ($this->object->getAvailabilityType()) {
55  return $this->lng->txt('offline');
56 
58  return $this->lng->txt('online');
59  }
60  return '';
61  }
62 
63  protected function addCustomEditForm(ilPropertyFormGUI $a_form): void
64  {
65  $radio_grp = new ilRadioGroupInputGUI($this->lng->txt('ecs_availability'), 'activation_type');
66  $radio_grp->setValue($this->object->getAvailabilityType());
67  $radio_grp->setDisabled(true);
68 
69  $radio_opt = new ilRadioOption($this->lng->txt('offline'), ilObjRemoteGlossary::ACTIVATION_OFFLINE);
70  $radio_grp->addOption($radio_opt);
71 
72  $radio_opt = new ilRadioOption($this->lng->txt('online'), ilObjRemoteGlossary::ACTIVATION_ONLINE);
73  $radio_grp->addOption($radio_opt);
74 
75  $a_form->addItem($radio_grp);
76  }
77 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilInfoScreenGUI.
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section
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)
__construct(Container $dic, ilPlugin $plugin)
addCustomInfoFields(ilInfoScreenGUI $a_info)