ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjRemoteGlossaryGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
34{
35 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
36 {
37 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
38
39 $this->lng->loadLanguageModule('rglo');
40 }
41
42 public function getType(): string
43 {
44 return 'rglo';
45 }
46
47 protected function addCustomInfoFields(ilInfoScreenGUI $a_info): void
48 {
49 $a_info->addProperty($this->lng->txt('ecs_availability'), $this->availabilityToString());
50 }
51
52 protected function availabilityToString()
53 {
54 switch ($this->object->getAvailabilityType()) {
56 return $this->lng->txt('offline');
57
59 return $this->lng->txt('online');
60 }
61 return '';
62 }
63
64 protected function addCustomEditForm(ilPropertyFormGUI $a_form): void
65 {
66 $radio_grp = new ilRadioGroupInputGUI($this->lng->txt('ecs_availability'), 'activation_type');
67 $radio_grp->setValue($this->object->getAvailabilityType());
68 $radio_grp->setDisabled(true);
69
70 $radio_opt = new ilRadioOption($this->lng->txt('offline'), ilObjRemoteGlossary::ACTIVATION_OFFLINE);
71 $radio_grp->addOption($radio_opt);
72
73 $radio_opt = new ilRadioOption($this->lng->txt('online'), ilObjRemoteGlossary::ACTIVATION_ONLINE);
74 $radio_grp->addOption($radio_opt);
75
76 $a_form->addItem($radio_grp);
77 }
78}
Class ilInfoScreenGUI.
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section
addCustomInfoFields(ilInfoScreenGUI $a_info)
Add custom fields to info screen.
addCustomEditForm(ilPropertyFormGUI $a_form)
Add custom fields to edit form.
getType()
Functions that must be overwritten.
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc