Moodle  2.2.1
http://www.collinsharper.com
context_block Class Reference
Inheritance diagram for context_block:
Collaboration diagram for context_block:

Public Member Functions

 get_context_name ($withprefix=true, $short=false)
 get_url ()
 get_capabilities ()
 get_course_context ($strict=true)
 get_child_contexts ()

Static Public Member Functions

static get_level_name ()
static instance ($instanceid, $strictness=MUST_EXIST)

Protected Member Functions

 __construct (stdClass $record)

Static Protected Member Functions

static create_level_instances ()
static get_cleanup_sql ()
static build_paths ($force)

Detailed Description

Block context class

Author:
Petr Skoda (http://skodak.org)
Since:
2.2

Definition at line 6522 of file accesslib.php.


Constructor & Destructor Documentation

__construct ( stdClass $  record) [protected]

Please use context_block::instance($blockinstanceid) if you need the instance of context. Alternatively if you know only the context id use context::instance_by_id($contextid)

Parameters:
stdClass$record

Reimplemented from context.

Definition at line 6529 of file accesslib.php.


Member Function Documentation

static build_paths ( force) [static, protected]

Rebuild context paths and depths at block context level.

Parameters:
$force

Reimplemented from context.

Definition at line 6702 of file accesslib.php.

Here is the call graph for this function:

static create_level_instances ( ) [static, protected]

Create missing context instances at block context level

Reimplemented from context.

Definition at line 6667 of file accesslib.php.

Returns array of relevant context capability records.

Returns:
array

Reimplemented from context.

Definition at line 6588 of file accesslib.php.

Here is the call graph for this function:

Block do not have child contexts...

Returns:
array

Reimplemented from context.

Definition at line 6659 of file accesslib.php.

static get_cleanup_sql ( ) [static, protected]

Returns sql necessary for purging of stale context instances.

Returns:
string cleanup SQL

Reimplemented from context.

Definition at line 6685 of file accesslib.php.

get_context_name ( withprefix = true,
short = false 
)

Returns human readable context identifier.

Parameters:
boolean$withprefixwhether to prefix the name of the context with Block
boolean$shortdoes not apply to block context
Returns:
string the human readable context name.

Reimplemented from context.

Definition at line 6553 of file accesslib.php.

get_course_context ( strict = true)

Is this context part of any course? If yes return course context.

Parameters:
bool$stricttrue means throw exception if not found, false means return false if not found
Returns:
course_context context of the enclosing course, null if not found or exception

Reimplemented from context.

Definition at line 6619 of file accesslib.php.

Here is the call graph for this function:

static get_level_name ( ) [static]

Returns human readable context level name.

Returns:
string the human readable context level name.

Definition at line 6542 of file accesslib.php.

get_url ( )

Returns the most relevant URL for this context.

Returns:
moodle_url

Reimplemented from context.

Definition at line 6578 of file accesslib.php.

Here is the call graph for this function:

static instance ( instanceid,
strictness = MUST_EXIST 
) [static]

Returns block context instance.

Parameters:
int$instanceid
int$strictness
Returns:
context_block context instance

Definition at line 6632 of file accesslib.php.

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:
 All Data Structures Namespaces Files Functions Variables Enumerations