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

Public Member Functions

 SimpleWidget ($name, $attributes)
 getName ()
 getDefault ()
 getValue ()
 setValue ($value)
 resetValue ()
 setLabel ($label)
 isLabel ($label)
 write (&$encoding)

Data Fields

 $_value
 $_label
 $_is_set

Detailed Description

Definition at line 231 of file tag.php.


Member Function Documentation

Accessor for default value parsed with the tag.

Returns:
string Parsed value. public

Reimplemented in SimpleCheckboxTag, SimpleRadioButtonTag, SimpleOptionTag, MultipleSelectionTag, SimpleSelectionTag, and SimpleTextAreaTag.

Definition at line 264 of file tag.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getName ( )

Accessor for name submitted as the key in GET/POST variables hash.

Returns:
string Parsed value. public

Definition at line 255 of file tag.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getValue ( )

Accessor for currently set value or default if none.

Returns:
string Value set by form or default if none. public

Reimplemented in MultipleSelectionTag, and SimpleSelectionTag.

Definition at line 275 of file tag.php.

Here is the call graph for this function:

Here is the caller graph for this function:

isLabel ( label)

Reads external or internal label.

Parameters:
string$labelLabel to test.
Returns:
boolean True is match. public

Reimplemented in SimpleButtonTag, SimpleImageSubmitTag, and SimpleSubmitTag.

Definition at line 319 of file tag.php.

Resets the form element value back to the default. public

Definition at line 299 of file tag.php.

setLabel ( label)

Allows setting of a label externally, say by a label tag.

Parameters:
string$labelLabel to attach. public

Definition at line 309 of file tag.php.

setValue ( value)

Sets the current form element value.

Parameters:
string$valueNew value.
Returns:
boolean True if allowed. public

Reimplemented in SimpleCheckboxTag, SimpleRadioButtonTag, SimpleOptionTag, MultipleSelectionTag, SimpleSelectionTag, SimpleTextAreaTag, SimpleButtonTag, SimpleImageSubmitTag, SimpleSubmitTag, and SimpleTextTag.

Definition at line 288 of file tag.php.

SimpleWidget ( name,
attributes 
)

Starts with a named tag with attributes only.

Parameters:
string$nameTag name.
hash$attributesAttribute names and string values.

Definition at line 242 of file tag.php.

Here is the call graph for this function:

Here is the caller graph for this function:

write ( &$  encoding)

Dispatches the value into the form encoded packet.

Parameters:
SimpleEncoding$encodingForm packet. public

Reimplemented in SimpleUploadTag.

Definition at line 328 of file tag.php.

Here is the call graph for this function:


Field Documentation

$_is_set

Definition at line 234 of file tag.php.

$_label

Definition at line 233 of file tag.php.

$_value

Definition at line 232 of file tag.php.


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