ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilObjBlogListGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once "Services/Object/classes/class.ilObjectListGUI.php";
6
16{
20 function init()
21 {
22 $this->copy_enabled = true;
23 $this->delete_enabled = true;
24 $this->cut_enabled = true;
25 $this->subscribe_enabled = true;
26 $this->link_enabled = true; // #10498
27 $this->info_screen_enabled = true;
28 $this->type = "blog";
29 $this->gui_class_name = "ilobjbloggui";
30
31 // general commands array
32 include_once('./Modules/Blog/classes/class.ilObjBlogAccess.php');
33 $this->commands = ilObjBlogAccess::_getCommands();
34 }
35
36 public function getCommands()
37 {
38 $commands = parent::getCommands();
39
40 // #10182 - handle edit and contribute
41 $permissions = array();
42 foreach($commands as $idx => $item)
43 {
44 if($item["lang_var"] == "edit" && $item["granted"])
45 {
46 $permissions[$item["permission"]] = $idx;
47 }
48 }
49 if(sizeof($permissions) == 2)
50 {
51 unset($commands[$permissions["contribute"]]);
52 }
53
54 return $commands;
55 }
56}
57
58?>
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.