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

Public Member Functions

 is_empty ()
 html_attributes ()

Data Fields

 $content_type = BLOCK_TYPE_LIST

Protected Member Functions

 formatted_contents ($output)

Detailed Description

Definition at line 677 of file moodleblock.class.php.


Member Function Documentation

formatted_contents ( output) [protected]

Convert the contents of the block to HTML.

This is used by block base classes like block_list to convert the structured $this->content->list and $this->content->icons arrays to HTML. So, in most blocks, you probaby want to override the get_contents() method, which generates that structured representation of the contents.

Parameters:
$outputThe core_renderer to use when generating the output.
Returns:
string the HTML that should appearn in the body of the block.
Since:
Moodle 2.0.

Reimplemented from block_base.

Reimplemented in block_tree.

Definition at line 689 of file moodleblock.class.php.

Here is the call graph for this function:

Return any HTML attributes that you want added to the outer

that of the block when it is output.
Because of the way certain JS events are wired it is a good idea to ensure that the default values here still get set. I found the easiest way to do this and still set anything you want is to override it within your block in the following way
function html_attributes() { $attributes = parent::html_attributes(); $attributes['class'] .= ' mynewclass'; return $attributes; }
Returns:
array attribute name => value.

Reimplemented from block_base.

Definition at line 699 of file moodleblock.class.php.

is_empty ( )

Returns true or false, depending on whether this block has any content to display and whether the user has permission to view the block

Returns:
boolean

Reimplemented from block_base.

Definition at line 680 of file moodleblock.class.php.

Here is the call graph for this function:


Field Documentation

$content_type = BLOCK_TYPE_LIST

The type of content that this block creates. Currently support options - BLOCK_TYPE_LIST, BLOCK_TYPE_TEXT

Reimplemented from block_base.

Reimplemented in block_tree.

Definition at line 678 of file moodleblock.class.php.


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