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

Public Member Functions

 init ()
 instance_allow_multiple ()
 applicable_formats ()
 instance_allow_config ()
 instance_can_be_hidden ()
 instance_can_be_docked ()
 get_required_javascript ()
 get_content ()
 html_attributes ()
 trim (navigation_node $node, $mode=1, $long=50, $short=25, $recurse=true, $textlib=null)

Data Fields

 $blockname = null
const TRIM_RIGHT = 1
const TRIM_LEFT = 2
const TRIM_CENTER = 3

Static Public Attributes

static $navcount

Protected Member Functions

 trim_left ($textlib, $string, $length)
 trim_right ($textlib, $string, $length)
 trim_center ($textlib, $string, $length)

Protected Attributes

 $contentgenerated = false
 $docked = null

Detailed Description

Definition at line 37 of file block_navigation.php.


Member Function Documentation

Set the applicable formats for this block to all

Returns:
array

Reimplemented from block_base.

Definition at line 76 of file block_navigation.php.

Gets the content for this block by grabbing it from $this->page

Reimplemented from block_base.

Definition at line 128 of file block_navigation.php.

Here is the call graph for this function:

Reimplemented from block_base.

Definition at line 102 of file block_navigation.php.

Here is the call graph for this function:

Returns the attributes to set for this block

This function returns an array of HTML attributes for this block including the defaults block_tree->html_attributes() is used to get the default arguments and then we check whether the user has enabled hover expansion and add the appropriate hover class if it has

Returns:
array An array of HTML attributes

Reimplemented from block_base.

Definition at line 218 of file block_navigation.php.

init ( )

Set the initial properties for the block

Definition at line 58 of file block_navigation.php.

Allow the user to configure a block instance

Returns:
bool Returns true

Reimplemented from block_base.

Definition at line 84 of file block_navigation.php.

All multiple instances of this block

Returns:
bool Returns true

Reimplemented from block_base.

Definition at line 68 of file block_navigation.php.

Can be overridden by the block to prevent the block from being dockable.

Returns:
bool

Reimplemented from block_base.

Definition at line 98 of file block_navigation.php.

The navigation block cannot be hidden by default as it is integral to the navigation of Moodle.

Returns:
false

Reimplemented from block_base.

Definition at line 94 of file block_navigation.php.

trim ( navigation_node node,
mode = 1,
long = 50,
short = 25,
recurse = true,
textlib = null 
)

Trims the text and shorttext properties of this node and optionally all of its children.

Parameters:
int$modeOne of navigation_node::TRIM_*
int$longThe length to trim text to
int$shortThe length to trim shorttext to
bool$recurseRecurse all children
textlib | null$textlib

Definition at line 236 of file block_navigation.php.

Here is the call graph for this function:

Here is the caller graph for this function:

trim_center ( textlib,
string,
length 
) [protected]

Truncate a string in the center

Parameters:
textlib$textlib
string$stringThe string to truncate
int$lengthThe length to truncate to
Returns:
string The truncated string

Definition at line 305 of file block_navigation.php.

Here is the caller graph for this function:

trim_left ( textlib,
string,
length 
) [protected]

Truncate a string from the left

Parameters:
textlib$textlib
string$stringThe string to truncate
int$lengthThe length to truncate to
Returns:
string The truncated string

Definition at line 285 of file block_navigation.php.

Here is the caller graph for this function:

trim_right ( textlib,
string,
length 
) [protected]

Truncate a string from the right

Parameters:
textlib$textlib
string$stringThe string to truncate
int$lengthThe length to truncate to
Returns:
string The truncated string

Definition at line 295 of file block_navigation.php.

Here is the caller graph for this function:


Field Documentation

$blockname = null

Definition at line 42 of file block_navigation.php.

$contentgenerated = false [protected]

Definition at line 44 of file block_navigation.php.

$docked = null [protected]

Definition at line 46 of file block_navigation.php.

$navcount [static]

Definition at line 40 of file block_navigation.php.

const TRIM_CENTER = 3

Definition at line 53 of file block_navigation.php.

const TRIM_LEFT = 2

Definition at line 51 of file block_navigation.php.

const TRIM_RIGHT = 1

Definition at line 49 of file block_navigation.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations