[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/blocks/navigation/ -> block_navigation.php (summary)

This file contains classes used to manage the navigation structures in Moodle and was introduced as part of the changes occuring in Moodle 2.0

Copyright: 2009 Sam Hemelryk
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 336 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

block_navigation:: (15 methods):
  init()
  instance_allow_multiple()
  applicable_formats()
  instance_allow_config()
  instance_can_be_hidden()
  instance_can_be_docked()
  get_required_javascript()
  get_content()
  get_navigation()
  html_attributes()
  trim()
  trim_left()
  trim_right()
  trim_center()
  get_aria_role()


Class: block_navigation  - X-Ref

The global navigation tree block class

Used to produce the global navigation block new to Moodle 2.0

init()   X-Ref
Set the initial properties for the block


instance_allow_multiple()   X-Ref
All multiple instances of this block

return: bool Returns false

applicable_formats()   X-Ref
Set the applicable formats for this block to all

return: array

instance_allow_config()   X-Ref
Allow the user to configure a block instance

return: bool Returns true

instance_can_be_hidden()   X-Ref
The navigation block cannot be hidden by default as it is integral to
the navigation of Moodle.

return: false

instance_can_be_docked()   X-Ref
Find out if an instance can be docked.

return: bool true or false depending on whether the instance can be docked or not.

get_required_javascript()   X-Ref
Gets Javascript that may be required for navigation


get_content()   X-Ref
Gets the content for this block by grabbing it from $this->page

return: object $this->content

get_navigation()   X-Ref
Returns the navigation

return: navigation_node The navigation object to display

html_attributes()   X-Ref
Returns the attributes to set for this block

This function returns an array of HTML attributes for this block including
the defaults.
{@link 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.

return: array An array of HTML attributes

trim(navigation_node $node, $mode=1, $long=50, $short=25, $recurse=true)   X-Ref
Trims the text and shorttext properties of this node and optionally
all of its children.

param: navigation_node $node
param: int $mode One of navigation_node::TRIM_*
param: int $long The length to trim text to
param: int $short The length to trim shorttext to
param: bool $recurse Recurse all children

trim_left($string, $length)   X-Ref
Truncate a string from the left

param: string $string The string to truncate
param: int $length The length to truncate to
return: string The truncated string

trim_right($string, $length)   X-Ref
Truncate a string from the right

param: string $string The string to truncate
param: int $length The length to truncate to
return: string The truncated string

trim_center($string, $length)   X-Ref
Truncate a string in the center

param: string $string The string to truncate
param: int $length The length to truncate to
return: string The truncated string

get_aria_role()   X-Ref
Returns the role that best describes the navigation block... 'navigation'

return: string 'navigation'



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1