|
Moodle
2.2.1
http://www.collinsharper.com
|
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 |
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.
Definition at line 2101 of file outputcomponents.php.
| __construct | ( | array $ | attributes = null | ) |
Create new instance of block content
| array | $attributes |
Definition at line 2180 of file outputcomponents.php.
| add_class | ( | $ | class | ) |
Add html class to block
| string | $class |
Definition at line 2198 of file outputcomponents.php.

| $annotation = '' |
Definition at line 2159 of file outputcomponents.php.
| array | $attributes | an 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 = '' |
| string | $content | HTML for the content |
Definition at line 2146 of file outputcomponents.php.
| $controls = array() |
Definition at line 2173 of file outputcomponents.php.
| $footer = '' |
| array | $list | an 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 = '' |
| string | $title | The 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.