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

Public Member Functions

 __construct ($item, $parent, $attributes= '', $display=true)
 item_html ($extraargs=array())
 to_html ($indent=0, $extraargs=array())
 set_icon_html ($first, $last, $lastitem)
 image_icon ($action, $url, $icon)
 image_spacer ()
 create_children (&$records, &$children, $thisrecordid)
 set_parent ($parent)

Data Fields

 $id
 $name
 $item
 $fieldnamesname = 'name'
 $attributes
 $display
 $icons = array()
 $parentlist
 $children

Detailed Description

Definition at line 465 of file listlib.php.


Constructor & Destructor Documentation

__construct ( item,
parent,
attributes = '',
display = true 
)

Constructor

Parameters:
mixed$itemfragment of html for list item or record
object$parentreference to parent of this item
string$attributesattributes for li tag
boolean$displaywhether this item is displayed. Some items may be loaded so we have a complete structure in memory to work with for actions but are not displayed.
Returns:
list_item

Definition at line 494 of file listlib.php.


Member Function Documentation

create_children ( &$  records,
&$  children,
thisrecordid 
)

Recurse down tree creating list_items, called from moodle_list::list_from_records

Parameters:
array$records
array$children
integer$thisrecordid

Definition at line 605 of file listlib.php.

image_icon ( action,
url,
icon 
)

Definition at line 587 of file listlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 593 of file listlib.php.

item_html ( extraargs = array())

Output the html just for this item. Called by to_html which adds html for children.

Reimplemented in question_category_list_item.

Definition at line 512 of file listlib.php.

set_icon_html ( first,
last,
lastitem 
)

Definition at line 545 of file listlib.php.

Here is the call graph for this function:

set_parent ( parent)

Definition at line 616 of file listlib.php.

to_html ( indent = 0,
extraargs = array() 
)

Returns html

Parameters:
integer$indent
array$extraargsany extra data that is needed to print the list item may be used by sub class.
Returns:
string html

Definition at line 531 of file listlib.php.


Field Documentation

Definition at line 475 of file listlib.php.

$children

Definition at line 483 of file listlib.php.

Definition at line 476 of file listlib.php.

$fieldnamesname = 'name'

Definition at line 474 of file listlib.php.

$icons = array()

Definition at line 477 of file listlib.php.

$id

Definition at line 467 of file listlib.php.

$item

Definition at line 473 of file listlib.php.

$name

Definition at line 470 of file listlib.php.

$parentlist

Definition at line 480 of file listlib.php.


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