ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjQuestionPoolListGUI.php
Go to the documentation of this file.
1<?php
2
30{
31 protected $command_link_params = [];
32
37 public function __construct($a_context = self::CONTEXT_REPOSITORY)
38 {
39 parent::__construct($a_context);
40 }
41
45 public function init(): void
46 {
47 $this->delete_enabled = true;
48 $this->cut_enabled = true;
49 $this->copy_enabled = true;
50 $this->subscribe_enabled = true;
51 $this->link_enabled = true;
52 $this->info_screen_enabled = true;
53 $this->type = "qpl";
54 $this->gui_class_name = "ilobjquestionpoolgui";
55
56 $this->commands = ilObjQuestionPoolAccess::_getCommands();
57 }
58
59
60
64 public function getCommandFrame(string $cmd): string
65 {
66 $frame = '';
67 switch ($cmd) {
68 case "":
69 case "questions":
70 $frame = ilFrameTargetInfo::_getFrame("MainContent");
71 break;
72
73 default:
74 }
75
76 return $frame;
77 }
78
79
80
89 public function getProperties(): array
90 {
91 $props = [];
92
93 if (!$this->object_properties->getPropertyIsOnline()->getIsOnline()) {
94 $props[] = ["alert" => true, "property" => $this->lng->txt("status"),
95 "value" => $this->lng->txt("offline")];
96 }
97 return $props;
98 }
99
100
104 public function getCommandLink(string $cmd): string
105 {
106 $cmd = explode('::', $cmd);
107
108 if (count($cmd) == 2) {
109 $cmd_link = $this->ctrl->getLinkTargetByClass(['ilRepositoryGUI', 'ilObjQuestionPoolGUI', $cmd[0]], $cmd[1]);
110 } else {
111 $cmd_link = $this->ctrl->getLinkTargetByClass('ilObjQuestionPoolGUI', $cmd[0]);
112 }
113
114 $params = array_merge(['ref_id' => $this->ref_id], $this->command_link_params);
115
116 foreach ($params as $param => $value) {
117 $cmd_link = ilUtil::appendUrlParameterString($cmd_link, "$param=$value", true);
118 }
119
120 return $cmd_link;
121 }
122} // END class.ilObjTestListGUI
static _getFrame(string $a_class)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getCommandFrame(string $cmd)
Get command target frame.
getCommandLink(string $cmd)
Get command link url.
__construct($a_context=self::CONTEXT_REPOSITORY)
constructor
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$param
Definition: xapitoken.php:46