Moodle  2.2.1
http://www.collinsharper.com
block_contents Class Reference

Public Member Functions

 __construct (array $attributes=null)
 add_class ($class)

Data Fields

const NOT_HIDEABLE = 0
const VISIBLE = 1
const HIDDEN = 2
 $skipid
 $blockinstanceid = 0
 $blockpositionid = 0
 $attributes
 $title = ''
 $content = ''
 $footer = ''
 $annotation = ''
 $collapsible = self::NOT_HIDEABLE
 $controls = array()

Static Protected Attributes

static $idcounter = 1

Detailed Description

This class represents how a block appears on a page.

During output, each block instance is asked to return a block_contents object, those are then passed to the $OUTPUT->block function for display.

$contents should probably be generated using a moodle_block_..._renderer.

Other block-like things that need to appear on the page, for example the add new block UI, are also represented as block_contents objects.

Since:
Moodle 2.0

Definition at line 2101 of file outputcomponents.php.


Constructor & Destructor Documentation

__construct ( array attributes = null)

Create new instance of block content

Parameters:
array$attributes

Definition at line 2180 of file outputcomponents.php.


Member Function Documentation

add_class ( class)

Add html class to block

Parameters:
string$class
Returns:
void

Definition at line 2198 of file outputcomponents.php.

Here is the caller graph for this function:


Field Documentation

$annotation = ''

Definition at line 2159 of file outputcomponents.php.

Parameters:
array$attributesan array of attribute => value pairs that are put on the outer div of this block. $id and $classes attributes should be set separately.

Definition at line 2134 of file outputcomponents.php.

$blockinstanceid = 0

Definition at line 2121 of file outputcomponents.php.

$blockpositionid = 0

Definition at line 2128 of file outputcomponents.php.

$collapsible = self::NOT_HIDEABLE

Definition at line 2165 of file outputcomponents.php.

$content = ''
Parameters:
string$contentHTML for the content

Definition at line 2146 of file outputcomponents.php.

$controls = array()

Definition at line 2173 of file outputcomponents.php.

$footer = ''
Parameters:
array$listan alternative to $content, it you want a list of things with optional icons.

Definition at line 2151 of file outputcomponents.php.

$idcounter = 1 [static, protected]

Definition at line 2103 of file outputcomponents.php.

$skipid

Definition at line 2115 of file outputcomponents.php.

$title = ''
Parameters:
string$titleThe title of this block. If this came from user input, it should already have had format_string() processing done on it. This will be output inside

tags. Please do not cause invalid XHTML.

Definition at line 2141 of file outputcomponents.php.

const HIDDEN = 2

Definition at line 2107 of file outputcomponents.php.

const NOT_HIDEABLE = 0

Definition at line 2105 of file outputcomponents.php.

const VISIBLE = 1

Definition at line 2106 of file outputcomponents.php.


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