ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjPortfolioTemplateAccess Class Reference

Class ilObjPortfolioTemplateAccess. More...

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

Public Member Functions

 __construct ()
 Constructor. More...
 
 _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...
 
 canBeDelivered (ilWACPath $ilWACPath)
 
Parameters
ilWACPath$ilWACPath
Returns
bool
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 if object type does not support centralized offline handling. More...
 
static _preloadData ($a_obj_ids, $a_ref_ids)
 Preload data. More...
 

Protected Attributes

 $user
 
 $lng
 
 $rbacsystem
 
 $access
 

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.

Constructor & Destructor Documentation

◆ __construct()

ilObjPortfolioTemplateAccess::__construct ( )

Constructor.

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

References $DIC, and user().

40  {
41  global $DIC;
42 
43  $this->user = $DIC->user();
44  $this->lng = $DIC->language();
45  $this->rbacsystem = $DIC->rbac()->system();
46  $this->access = $DIC->access();
47  }
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
+ Here is the call graph for this function:

Member Function Documentation

◆ _checkAccess()

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

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

References $access, $ilUser, $lng, $rbacsystem, $user, IL_NO_OBJECT_ACCESS, and IL_STATUS_MESSAGE.

62  {
64  $lng = $this->lng;
66  $ilAccess = $this->access;
67 
68  if ($a_user_id == "") {
69  $a_user_id = $ilUser->getId();
70  }
71 
72  switch ($a_cmd) {
73  case "view":
74  if (!self::_lookupOnline($a_obj_id)
75  && !$rbacsystem->checkAccessOfUser($a_user_id, 'write', $a_ref_id)) {
76  $ilAccess->addInfoItem(IL_NO_OBJECT_ACCESS, $lng->txt("offline"));
77  return false;
78  }
79  break;
80 
81  // for permission query feature
82  case "infoScreen":
83  if (!self::_lookupOnline($a_obj_id)) {
84  $ilAccess->addInfoItem(IL_NO_OBJECT_ACCESS, $lng->txt("offline"));
85  } else {
86  $ilAccess->addInfoItem(IL_STATUS_MESSAGE, $lng->txt("online"));
87  }
88  break;
89 
90  }
91 
92  switch ($a_permission) {
93  case "read":
94  case "visible":
95  if (!self::_lookupOnline($a_obj_id) &&
96  (!$rbacsystem->checkAccessOfUser($a_user_id, 'write', $a_ref_id))) {
97  $ilAccess->addInfoItem(IL_NO_OBJECT_ACCESS, $lng->txt("offline"));
98  return false;
99  }
100  break;
101  }
102 
103  return true;
104  }
const IL_NO_OBJECT_ACCESS
const IL_STATUS_MESSAGE
$ilUser
Definition: imgupload.php:18

◆ _checkGoto()

static ilObjPortfolioTemplateAccess::_checkGoto (   $a_target)
static

check whether goto script will succeed

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

References $DIC.

116  {
117  global $DIC;
118 
119  $ilAccess = $DIC->access();
120 
121  $t_arr = explode("_", $a_target);
122 
123  if ($t_arr[0] != "prtt" || ((int) $t_arr[1]) <= 0) {
124  return false;
125  }
126 
127  if ($ilAccess->checkAccess("read", "", $t_arr[1])) {
128  return true;
129  }
130  return false;
131  }
global $DIC
Definition: saml.php:7

◆ _getCommands()

static ilObjPortfolioTemplateAccess::_getCommands ( )
static

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

Referenced by ilObjPortfolioTemplateListGUI\init().

50  {
51  $commands = array(
52  array("permission" => "read", "cmd" => "preview", "lang_var" => "preview", "default" => true),
53  array("permission" => "write", "cmd" => "view", "lang_var" => "edit"),
54  array("permission" => "read", "cmd" => "createfromtemplate", "lang_var" => "prtf_create_portfolio_from_template"),
55  // array("permission" => "write", "cmd" => "export", "lang_var" => "export_html")
56  );
57 
58  return $commands;
59  }
+ Here is the caller graph for this function:

◆ _lookupOnline()

static ilObjPortfolioTemplateAccess::_lookupOnline (   $a_id)
static

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

References ilObjPortfolioBase\lookupOnline().

Referenced by ilObjPortfolioTemplateListGUI\getProperties().

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

Field Documentation

◆ $access

ilObjPortfolioTemplateAccess::$access
protected

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

Referenced by _checkAccess().

◆ $lng

ilObjPortfolioTemplateAccess::$lng
protected

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

Referenced by _checkAccess().

◆ $rbacsystem

ilObjPortfolioTemplateAccess::$rbacsystem
protected

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

Referenced by _checkAccess().

◆ $user

ilObjPortfolioTemplateAccess::$user
protected

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

Referenced by _checkAccess().


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