ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilObjBlogListGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11{
15 public function init()
16 {
17 $this->copy_enabled = true;
18 $this->delete_enabled = true;
19 $this->cut_enabled = true;
20 $this->subscribe_enabled = true;
21 $this->link_enabled = true; // #10498
22 $this->info_screen_enabled = true;
23 $this->type = "blog";
24 $this->gui_class_name = "ilobjbloggui";
25
26 // general commands array
27 $this->commands = ilObjBlogAccess::_getCommands();
28 }
29
30 public function getCommands()
31 {
32 $commands = parent::getCommands();
33
34 // #10182 - handle edit and contribute
35 $permissions = array();
36 foreach ($commands as $idx => $item) {
37 if ($item["lang_var"] == "edit" && $item["granted"]) {
38 $permissions[$item["permission"]] = $idx;
39 }
40 }
41 if (sizeof($permissions) == 2) {
42 unset($commands[$permissions["contribute"]]);
43 }
44
45 return $commands;
46 }
47}
An exception for terminatinating execution or to throw for unit testing.
static _getCommands()
get commands
Class ilObjBlogListGUI.
getCommands()
get all current commands for a specific ref id (in the permission context of the current user)
Class ilObjectListGUI.