ILIAS  release_8 Revision v8.24
class.ilObjRemoteGlossaryGUI.php
Go to the documentation of this file.
1<?php
2
18declare(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}
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 file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc