ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjPortfolioTemplateAccess Class Reference

Class ilObjPortfolioTemplateAccess. More...

+ Inheritance diagram for ilObjPortfolioTemplateAccess:
+ Collaboration diagram for ilObjPortfolioTemplateAccess:

Public Member Functions

 _checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
 
- Public Member Functions inherited from ilObjectAccess
 _checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
 Checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More...
 
 _checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id)
 check condition More...
 

Static Public Member Functions

static _getCommands ()
 
static _lookupOnline ($a_id)
 
static _checkGoto ($a_target)
 check whether goto script will succeed More...
 
- Static Public Member Functions inherited from ilObjectAccess
static _getCommands ()
 get commands More...
 
static _checkGoto ($a_target)
 check whether goto script will succeed More...
 
static _isOffline ($a_obj_id)
 Type-specific implementation of general status, has to be overwritten. More...
 
static _preloadData ($a_obj_ids, $a_ref_ids)
 Preload data. More...
 

Detailed Description

Class ilObjPortfolioTemplateAccess.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id
class.ilObjRootFolderAccess.php 15678 2008-01-06 20:40:55Z akill

Definition at line 13 of file class.ilObjPortfolioTemplateAccess.php.

Member Function Documentation

◆ _checkAccess()

ilObjPortfolioTemplateAccess::_checkAccess (   $a_cmd,
  $a_permission,
  $a_ref_id,
  $a_obj_id,
  $a_user_id = "" 
)

Definition at line 28 of file class.ilObjPortfolioTemplateAccess.php.

References $ilUser, $lng, and IL_NO_OBJECT_ACCESS.

29  {
30  global $ilUser, $lng, $rbacsystem, $ilAccess;
31 
32  if ($a_user_id == "")
33  {
34  $a_user_id = $ilUser->getId();
35  }
36 
37  switch ($a_cmd)
38  {
39  case "view":
40  if(!self::_lookupOnline($a_obj_id)
41  && !$rbacsystem->checkAccessOfUser($a_user_id,'write',$a_ref_id))
42  {
43  $ilAccess->addInfoItem(IL_NO_OBJECT_ACCESS, $lng->txt("offline"));
44  return false;
45  }
46  break;
47 
48  // for permission query feature
49  case "infoScreen":
50  if(!self::_lookupOnline($a_obj_id))
51  {
52  $ilAccess->addInfoItem(IL_NO_OBJECT_ACCESS, $lng->txt("offline"));
53  }
54  else
55  {
56  $ilAccess->addInfoItem(IL_STATUS_MESSAGE, $lng->txt("online"));
57  }
58  break;
59 
60  }
61 
62  switch($a_permission)
63  {
64  case "read":
65  case "visible":
66  if (!self::_lookupOnline($a_obj_id) &&
67  (!$rbacsystem->checkAccessOfUser($a_user_id, 'write', $a_ref_id)))
68  {
69  $ilAccess->addInfoItem(IL_NO_OBJECT_ACCESS, $lng->txt("offline"));
70  return false;
71  }
72  break;
73  }
74 
75  return true;
76  }
const IL_NO_OBJECT_ACCESS
$ilUser
Definition: imgupload.php:18
global $lng
Definition: privfeed.php:17

◆ _checkGoto()

static ilObjPortfolioTemplateAccess::_checkGoto (   $a_target)
static

check whether goto script will succeed

Definition at line 87 of file class.ilObjPortfolioTemplateAccess.php.

88  {
89  global $ilAccess;
90 
91  $t_arr = explode("_", $a_target);
92 
93  if ($t_arr[0] != "prtt" || ((int) $t_arr[1]) <= 0)
94  {
95  return false;
96  }
97 
98  if ($ilAccess->checkAccess("read", "", $t_arr[1]))
99  {
100  return true;
101  }
102  return false;
103  }

◆ _getCommands()

static ilObjPortfolioTemplateAccess::_getCommands ( )
static

Definition at line 15 of file class.ilObjPortfolioTemplateAccess.php.

References array.

Referenced by ilObjPortfolioTemplateListGUI\init().

16  {
17  $commands = array
18  (
19  array("permission" => "read", "cmd" => "preview", "lang_var" => "preview", "default" => true),
20  array("permission" => "write", "cmd" => "view", "lang_var" => "edit"),
21  array("permission" => "read", "cmd" => "createfromtemplate", "lang_var" => "prtf_create_portfolio_from_template"),
22  // array("permission" => "write", "cmd" => "export", "lang_var" => "export_html")
23  );
24 
25  return $commands;
26  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ _lookupOnline()

static ilObjPortfolioTemplateAccess::_lookupOnline (   $a_id)
static

Definition at line 78 of file class.ilObjPortfolioTemplateAccess.php.

References ilObjPortfolioBase\lookupOnline().

Referenced by ilObjPortfolioTemplateListGUI\getProperties().

79  {
80  include_once "Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php";
82  }
static lookupOnline($a_id)
Is online?
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: