ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjWikiListGUI.php
Go to the documentation of this file.
1<?php
2
25{
26 protected string $child_id;
27
31 public function init(): void
32 {
33 $this->copy_enabled = true;
34 $this->delete_enabled = true;
35 $this->cut_enabled = true;
36 $this->subscribe_enabled = true;
37 $this->link_enabled = true;
38 $this->info_screen_enabled = true;
39 $this->type = "wiki";
40 $this->gui_class_name = "ilobjwikigui";
41
42 // general commands array
43 $this->commands = ilObjWikiAccess::_getCommands();
44 }
45
46 public function getProperties(): array
47 {
49
50 $props = parent::getProperties();
51
52 $lng->loadLanguageModule("wiki");
53 $info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj($this->ref_id, $this->user->getId());
54 if (count($info) > 0) {
56 foreach ($sub as $s) {
57 $team = new ilExAssignmentTeam($s["team_id"]);
58 $mem = array_map(static function ($id): string {
60 return $name["firstname"] . " " . $name["lastname"];
61 }, $team->getMembers());
62 $props[] = array("alert" => false, "property" => $lng->txt("wiki_team_members"),
63 "value" => implode(", ", $mem));
64 }
65 }
66
67
68 return $props;
69 }
70
71 public function getCommandLink(string $cmd): string
72 {
73 switch ($cmd) {
74 case 'downloadFile':
75 $cmd_link = "ilias.php?baseClass=ilWikiHandlerGUI" .
76 "&amp;cmdClass=ilwikipagegui&amp;ref_id=" . $this->ref_id .
77 "&amp;cmd=downloadFile&amp;file_id=" . $this->getChildId();
78 break;
79
80 default:
81 // separate method for this line
82 $cmd_link = "ilias.php?baseClass=ilWikiHandlerGUI&ref_id=" . $this->ref_id . "&cmd=$cmd";
83 break;
84 }
85 return $cmd_link;
86 }
87
88 public function setChildId(string $a_child_id): void
89 {
90 $this->child_id = $a_child_id;
91 }
92
93 public function getChildId(): string
94 {
95 return $this->child_id;
96 }
97}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getSubmissionsForFilename(string $a_filename, array $a_assignment_types=array())
Get assignment return entries for a filename.
loadLanguageModule(string $a_module)
Load language module.
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...
static _lookupName(int $a_user_id)
static _getCommands()
get commands
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getCommandLink(string $cmd)
Get command link url.
getProperties()
Get item properties.
setChildId(string $a_child_id)
$info
Definition: entry_point.php:21