19 declare(strict_types=1);
30 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
36 $this->
logger = $DIC->logger()->wsrv();
38 $this->
lng->loadLanguageModule(
'ecs');
43 $next_class = $this->
ctrl->getNextClass($this);
44 $cmd = $this->
ctrl->getCmd();
49 switch ($next_class) {
50 case 'ilinfoscreengui':
55 case 'ilpermissiongui':
56 $this->tabs_gui->activateTab(
'id_permissions');
60 case "ilcommonactiondispatchergui":
62 $this->
ctrl->forwardCommand($gui);
65 case strtolower(ilECSUserConsentModalGUI::class):
71 $this->
ctrl->setReturn($this,
'call');
72 $this->
ctrl->forwardCommand($consent_gui);
76 if (!$cmd || $cmd ===
'view') {
80 $this->
logger->info(
"cmd before call:" . print_r($cmd,
true));
84 $this->
logger->info(
"cmd:" . print_r($cmd,
true));
93 $this->
object->isLocalObject()) {
94 $this->
ctrl->redirectToURL($this->
object->getRemoteLink());
96 $link = $this->
object->getFullRemoteLink();
97 $this->
ctrl->redirectToURL($link);
107 $this->tabs_gui->addTab(
109 $this->
lng->txt(
"info_short"),
110 $this->
ctrl->getLinkTarget($this,
"infoScreen")
115 $this->tabs_gui->addTab(
117 $this->
lng->txt(
"edit"),
118 $this->
ctrl->getLinkTarget($this,
"edit")
122 $this->tabs_gui->addTab(
123 self::TAB_ID_PERMISSIONS,
124 $this->
lng->txt(
"perm_settings"),
125 $this->
ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm")
139 $this->
object->getRefId(),
140 $this->
object->getId(),
146 $link = $this->
object->getFullRemoteLink();
148 $this->
ctrl->redirectToURL($link);
152 $this->tpl->setOnScreenMessage(
'failure',
'Cannot call remote object.');
162 $this->
ctrl->redirectByClass(ilInfoScreenGUI::class,
"showSummary");
170 if (!$this->
access->checkAccess(
"visible",
"", $this->object->getRefId())) {
171 $this->error->raiseError(
172 $this->
lng->txt(
'msg_no_perm_read'),
173 $this->error->MESSAGE
177 $this->
ctrl->setReturn($this,
'call');
179 $this->
user->getId(),
185 $this->tabs_gui->activateTab(
'info');
189 $info->addSection($this->
lng->txt(
'ecs_general_info'));
190 $info->addProperty($this->
lng->txt(
'title'), $this->
object->getTitle());
191 if ($this->
object->getOrganization()) {
192 $info->addProperty($this->
lng->txt(
'organization'), $this->
object->getOrganization());
194 if ($this->
object->getDescription()) {
195 $info->addProperty($this->
lng->txt(
'description'), $this->
object->getDescription());
197 if ($this->
object->getLocalInformation()) {
198 $info->addProperty($this->
lng->txt(
'ecs_local_information'), $this->
object->getLocalInformation());
209 $record_gui->parse();
229 if (!$this->
access->checkAccess(
"write",
"", $this->object->getRefId())) {
230 $this->error->raiseError($this->
lng->txt(
'msg_no_perm_read'), $this->error->MESSAGE);
233 $this->tabs_gui->activateTab(
'edit');
238 $this->tpl->setContent($form->getHTML());
247 $form->setFormAction($this->
ctrl->getFormAction($this));
248 $form->setTitle($this->
lng->txt(
'ecs_general_info'));
249 $form->addCommandButton(
'update', $this->
lng->txt(
'save'));
250 $form->addCommandButton(
'edit', $this->
lng->txt(
'cancel'));
253 $text->setValue($this->
object->getTitle());
256 $text->setDisabled(
true);
257 $form->addItem($text);
263 $area->setDisabled(
true);
264 $form->addItem($area);
270 $form->addItem($area);
280 $record_gui->parse();
297 $this->error->raiseError($this->
lng->txt(
'msg_no_perm_read'), $this->error->MESSAGE);
301 if ($form->checkInput()) {
302 $this->
object->setLocalInformation($form->getInput(
'local_info'));
306 $this->
object->update();
315 $record_gui->writeEditForm();
317 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"));
321 $form->setValuesByPost();
334 public static function _goto(
string $a_target): void
338 $ilAccess = $DIC->access();
340 $lng = $DIC->language();
341 if ($ilAccess->checkAccess(
"read",
"", (
int) $a_target)) {
345 if ($ilAccess->checkAccess(
"visible",
"", (
int) $a_target)) {
callObject()
call remote object
editObject(?ilPropertyFormGUI $form=null)
Edit settings.
setPropertyForm(ilPropertyFormGUI $form)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
New implementation of ilObjectGUI.
infoScreen()
show info screen
importEditFormPostValues()
Load edit form values from post.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
addCustomInfoFields(ilInfoScreenGUI $a_info)
Add custom fields to info screen.
prepareOutput(bool $show_sub_objects=true)
setValue(string $a_value)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
infoScreenObject()
this one is called from the info button in the repository
getType()
Functions that must be overwritten.
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, bool $isCatchupWriteEvents=true, $a_ext_rc=null, $a_ext_time=null)
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
showObject()
show remote object
addLinkToToolbar(ilToolbarGUI $toolbar)
__construct(Container $dic, ilPlugin $plugin)
This class represents a text area property in a property form.
setInfoObject(ilInfoScreenGUI $info)
get info sections
updateCustomValues(ilPropertyFormGUI $a_form)
Update object custom values.
initEditForm()
Init edit settings form.
static _goto(string $a_target)
addCustomEditForm(ilPropertyFormGUI $a_form)
Add custom fields to edit form.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call