|
Moodle
2.2.1
http://www.collinsharper.com
|

Public Member Functions | |
| HTML_Common ($attributes=null, $tabOffset=0) | |
| apiVersion () | |
| _getLineEnd () | |
| _getTab () | |
| _getTabs () | |
| _getAttrString ($attributes) | |
| _parseAttributes ($attributes) | |
| _getAttrKey ($attr, $attributes) | |
| _updateAttrArray (&$attr1, $attr2) | |
| _removeAttr ($attr, &$attributes) | |
| getAttribute ($attr) | |
| setAttributes ($attributes) | |
| getAttributes ($asString=false) | |
| updateAttributes ($attributes) | |
| removeAttribute ($attr) | |
| setLineEnd ($style) | |
| setTabOffset ($offset) | |
| getTabOffset () | |
| setTab ($string) | |
| setComment ($comment) | |
| getComment () | |
| toHtml () | |
| display () | |
Data Fields | |
| $_attributes = array() | |
| $_tabOffset = 0 | |
| $_tab = "\11" | |
| $_lineEnd = "\12" | |
| $_comment = '' | |
Base class for all HTML classes
Definition at line 39 of file Common.php.
| _getAttrKey | ( | $ | attr, |
| $ | attributes | ||
| ) |
Returns the array key for the given non-name-value pair attribute
| string | $attr | Attribute |
| array | $attributes | Array of attribute |
Definition at line 207 of file Common.php.
| _getAttrString | ( | $ | attributes | ) |
Returns an HTML formatted attribute string
| array | $attributes |
Definition at line 144 of file Common.php.

| _getLineEnd | ( | ) |
Returns the lineEnd
Definition at line 110 of file Common.php.
| _getTab | ( | ) |
Returns a string containing the unit for indenting HTML
Definition at line 122 of file Common.php.

| _getTabs | ( | ) |
Returns a string containing the offset for the whole HTML code
Definition at line 133 of file Common.php.


| _parseAttributes | ( | $ | attributes | ) |
Returns a valid atrributes array from either a string or array
| mixed | $attributes | Either a typical HTML attribute string or an associative array private |
Definition at line 161 of file Common.php.

| _removeAttr | ( | $ | attr, |
| &$ | attributes | ||
| ) |
Removes the given attribute from the given array
| string | $attr | Attribute name |
| array | $attributes | Attribute array |
Definition at line 242 of file Common.php.

| _updateAttrArray | ( | &$ | attr1, |
| $ | attr2 | ||
| ) |
Updates the attributes in $attr1 with the values in $attr2 without changing the other existing attributes
| array | $attr1 | Original attributes array |
| array | $attr2 | New attributes array private |
Definition at line 222 of file Common.php.

| apiVersion | ( | ) |
Returns the current API version public
Reimplemented in HTML_QuickForm, HTML_QuickForm_element, and HTML_QuickForm_select.
Definition at line 97 of file Common.php.
| display | ( | ) |
Displays the HTML to the screen
public
Reimplemented in HTML_QuickForm_DHTMLRulesTableless.
Definition at line 422 of file Common.php.

| getAttribute | ( | $ | attr | ) |
Returns the value of the given attribute
| string | $attr | Attribute name |
Definition at line 259 of file Common.php.

| getAttributes | ( | $ | asString = false | ) |
Returns the assoc array (default) or string of attributes
| bool | Whether to return the attributes as string |
Definition at line 286 of file Common.php.


| getComment | ( | ) |
Returns the HTML comment
Definition at line 400 of file Common.php.

| getTabOffset | ( | ) |
| HTML_Common | ( | $ | attributes = null, |
| $ | tabOffset = 0 |
||
| ) |
Class constructor
| mixed | $attributes | Associative array of table tag attributes or HTML attributes name="value" pairs |
| int | $tabOffset | Indent offset in tabs public |
Definition at line 86 of file Common.php.


| removeAttribute | ( | $ | attr | ) |
Removes an attribute
| string | $attr | Attribute name |
Definition at line 314 of file Common.php.


| setAttributes | ( | $ | attributes | ) |
Sets the HTML attributes
| mixed | $attributes | Either a typical HTML attribute string or an associative array public |
Definition at line 273 of file Common.php.


| setComment | ( | $ | comment | ) |
Sets the HTML comment to be displayed at the beginning of the HTML string
| string |
Definition at line 388 of file Common.php.
| setLineEnd | ( | $ | style | ) |
Sets the line end style to Windows, Mac, Unix or a custom string.
| string | $style | "win", "mac", "unix" or custom string. |
Definition at line 327 of file Common.php.
| setTab | ( | $ | string | ) |
Sets the string used to indent HTML
| string | $string | String used to indent ("\11", "\t", ' ', etc.). public |
Definition at line 375 of file Common.php.
| setTabOffset | ( | $ | offset | ) |
Sets the tab offset
| int | $offset | public |
Definition at line 350 of file Common.php.

| toHtml | ( | ) |
Abstract method. Must be extended to return the objects HTML
public
Reimplemented in HTML_QuickForm_select, HTML_QuickForm_date, MoodleQuickForm_selectgroups, HTML_QuickForm_group, HTML_QuickForm_hierselect, MoodleQuickForm_tags, MoodleQuickForm_date_time_selector, HTML_QuickForm_advcheckbox, HTML_QuickForm_textarea, MoodleQuickForm_date_selector, MoodleQuickForm_duration, HTML_QuickForm_link, HTML_QuickForm_input, MoodleQuickForm_editor, HTML_QuickForm_radio, HTML_QuickForm_static, HTML_QuickForm_checkbox, HTML_QuickForm_autocomplete, MoodleQuickForm_filemanager, MoodleQuickForm_advcheckbox, MoodleQuickForm_rubriceditor, MoodleQuickForm_grading, MoodleQuickForm_checkbox, MoodleQuickForm_wikifiletable, HTML_QuickForm_hiddenselect, MoodleQuickForm_radio, HTML_QuickForm_xbutton, MoodleQuickForm_recaptcha, MoodleQuickForm_htmleditor, MoodleQuickForm_textarea, MoodleQuickForm_wikieditor, MoodleQuickForm_filepicker, MoodleQuickForm_searchableselector, MoodleQuickForm_warning, MoodleQuickForm_selectwithlink, MoodleQuickForm_passwordunmask, MoodleQuickForm_url, MoodleQuickForm_text, MoodleQuickForm_select, and MoodleQuickForm_submitlink.
Definition at line 412 of file Common.php.

| updateAttributes | ( | $ | attributes | ) |
Updates the passed attributes without changing the other existing attributes
| mixed | $attributes | Either a typical HTML attribute string or an associative array public |
Definition at line 300 of file Common.php.


| $_attributes = array() |
Definition at line 46 of file Common.php.
| $_comment = '' |
Definition at line 77 of file Common.php.
| $_lineEnd = "\12" |
Definition at line 69 of file Common.php.
| $_tab = "\11" |
Definition at line 61 of file Common.php.
| $_tabOffset = 0 |
Definition at line 53 of file Common.php.