ILIAS  release_8 Revision v8.24
class.ilObjBookingPoolListGUI.php
Go to the documentation of this file.
1<?php
2
23{
24 protected \ILIAS\BookingManager\StandardGUIRequest $book_request;
25
26 public function __construct()
27 {
28 global $DIC;
29
30 $this->ctrl = $DIC->ctrl();
31 $this->lng = $DIC->language();
33 $this->book_request = $DIC->bookingManager()
34 ->internal()
35 ->gui()
36 ->standardRequest();
37 }
38
39 public function init(): void
40 {
41 $this->static_link_enabled = true;
42 $this->delete_enabled = true;
43 $this->cut_enabled = true;
44 $this->copy_enabled = true;
45 $this->subscribe_enabled = true;
46 $this->link_enabled = true;
47 $this->info_screen_enabled = true;
48 $this->type = "book";
49 $this->gui_class_name = "ilobjbookingpoolgui";
50
51 // general commands array
52 $this->commands = ilObjBookingPoolAccess::_getCommands();
53 }
54
55 public function getCommandLink(string $cmd): string
56 {
57 $ilCtrl = $this->ctrl;
58
59 switch ($cmd) {
60 default:
61 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
62 $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $cmd);
63 $ilCtrl->setParameterByClass(
64 "ilrepositorygui",
65 "ref_id",
66 $this->book_request->getRefId()
67 );
68 break;
69 }
70
71 return $cmd_link;
72 }
73
74 public function getProperties(): array
75 {
77
78 // #11193
79
80 $props = array();
81
82 if (!ilObjBookingPool::_lookupOnline($this->obj_id)) {
83 $props[] = array("alert" => true, "property" => $lng->txt("status"),
84 "value" => $lng->txt("offline"));
85 }
86 return $props;
87 }
88}
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS BookingManager StandardGUIRequest $book_request
getCommandLink(string $cmd)
Get command link url.
static _lookupOnline(int $a_obj_id)
ilCtrlInterface $ctrl
global $DIC
Definition: feed.php:28
setParameterByClass(string $a_class, string $a_parameter, $a_value)
Sets a parameter for the given GUI class and appends the given value as well.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc