ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjForumAccess Class Reference

Class ilObjForumAccess. More...

+ Inheritance diagram for ilObjForumAccess:
+ Collaboration diagram for ilObjForumAccess:

Public Member Functions

 _getCommands ()
 get commands this method returns an array of all possible commands/permission combinations example: $commands = array ( array("permission" => "read", "cmd" => "view", "lang_var" => "show"), array("permission" => "write", "cmd" => "edit", "lang_var" => "edit"), ); Comment mjansen: Cannot make this static because parent method is not static ...
 _preloadData ($obj_ids, $ref_ids)
- 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)
 _checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id=0)
 check condition
 _checkGoto ($a_target)
 check whether goto script will succeed

Static Public Member Functions

static prepareMessageForLists ($text)
 Prepare message for container view.
static getLastPostByRefId ($ref_id)
static getStatisticsByRefId ($ref_id)
static getCachedUserInstance ($usr_id)
- Static Public Member Functions inherited from ilObjectAccess
static _isOffline ($a_obj_id)
 Type-specific implementation of general status, has to be overwritten.

Static Protected Attributes

static $userInstanceCache = array()

Detailed Description

Class ilObjForumAccess.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Member Function Documentation

ilObjForumAccess::_getCommands ( )

get commands this method returns an array of all possible commands/permission combinations example: $commands = array ( array("permission" => "read", "cmd" => "view", "lang_var" => "show"), array("permission" => "write", "cmd" => "edit", "lang_var" => "edit"), ); Comment mjansen: Cannot make this static because parent method is not static ...

Returns
array

Reimplemented from ilObjectAccess.

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

Referenced by ilObjForumListGUI\init().

{
$commands = array
(
array(
'permission'=> 'read',
'cmd' => 'showThreads',
'lang_var' => 'show',
'default' => true
),
array(
'permission'=> 'write',
'cmd' => 'edit',
'lang_var' => 'settings'
),
);
return $commands;
}

+ Here is the caller graph for this function:

ilObjForumAccess::_preloadData (   $obj_ids,
  $ref_ids 
)
Parameters
array$obj_ids
array$ref_ids

Reimplemented from ilObjectAccess.

Definition at line 168 of file class.ilObjForumAccess.php.

{
/*
We are only able to preload the top_pk values for the forum ref_ids.
Other data like statistics and last posts require permission checks per reference, so there is no added value for using an SQL IN() function in the queries
*/
ilObjForum::preloadForumIdsByRefIds((array)$ref_ids);
}
static ilObjForumAccess::getCachedUserInstance (   $usr_id)
static
Parameters
int$usr_id
Returns
ilObjUser|boolean

Definition at line 202 of file class.ilObjForumAccess.php.

References $usr_id, and ilObjectFactory\getInstanceByObjId().

Referenced by ilForumPost\getUserData(), and ilForumAuthorInformation\initUserInstance().

{
if(!isset(self::$userInstanceCache[$usr_id]))
{
self::$userInstanceCache[$usr_id] = ilObjectFactory::getInstanceByObjId($usr_id, false);
}
return self::$userInstanceCache[$usr_id];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilObjForumAccess::getLastPostByRefId (   $ref_id)
static
Parameters
int$ref_id
Returns
array

Definition at line 182 of file class.ilObjForumAccess.php.

References $ref_id.

{
return ilObjForum::lookupLastPostByRefId($ref_id);
}
static ilObjForumAccess::getStatisticsByRefId (   $ref_id)
static
Parameters
int$ref_id
Returns
array

Definition at line 192 of file class.ilObjForumAccess.php.

References $ref_id.

{
return ilObjForum::lookupStatisticsByRefId($ref_id);
}
static ilObjForumAccess::prepareMessageForLists (   $text)
static

Prepare message for container view.

Parameters
string$text
Returns
string

Definition at line 150 of file class.ilObjForumAccess.php.

References ilStr\strLen(), and ilStr\subStr().

{
include_once 'Services/Utilities/classes/class.ilStr.php';
$text = strip_tags($text);
$text = preg_replace('/\[(\/)?quote\]/', '', $text);
if(ilStr::strLen($text) > 40)
{
$text = ilStr::subStr($text, 0, 37) . '...';
}
return $text;
}

+ Here is the call graph for this function:

Field Documentation

ilObjForumAccess::$userInstanceCache = array()
staticprotected

Definition at line 19 of file class.ilObjForumAccess.php.


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