dokeos-gradebook
[ class tree: dokeos-gradebook ] [ index: dokeos-gradebook ] [ all elements ]

Class: CatForm

Source Location: /main/gradebook/lib/fe/catform.class.php

Class Overview

HTML_Common
   |
   --HTML_QuickForm
      |
      --FormValidator
         |
         --CatForm

Extends formvalidator with add&edit forms


Author(s):

  • Stijn Konings

Version:

  • 2.0

Variables

Constants

Methods


Inherited Variables

Inherited Methods

Class: FormValidator

FormValidator::FormValidator()
Constructor
FormValidator::add_datepicker()
Add a datepicker element to the form
FormValidator::add_datepickerdate()
Add a datepickerdate element to the form
FormValidator::add_html_editor()
Add a HTML-editor to the form to fill in a title.
FormValidator::add_multiple_required_rule()
This function avoid to change directly QuickForm class.
FormValidator::add_progress_bar()
Adds a progress bar to the form.
FormValidator::add_real_progress_bar()
Use the new functions (php 5.2) allowing to display a real upload progress.
FormValidator::add_resource_button()
Add a button to the form to add resources.
FormValidator::add_textfield()
Add a textfield to the form.
FormValidator::add_timewindow()
Add a timewindow element to the form.
FormValidator::display()
Display the form.
FormValidator::return_form()
Returns the HTML code of the form.

Class: HTML_QuickForm

HTML_QuickForm::HTML_QuickForm()
Class constructor
HTML_QuickForm::accept()
Accepts a renderer
HTML_QuickForm::addElement()
Adds an element into the form
HTML_QuickForm::addFormRule()
Adds a global validation rule
HTML_QuickForm::addGroup()
Adds an element group
HTML_QuickForm::addGroupRule()
Adds a validation rule for the given group of elements
HTML_QuickForm::addRule()
Adds a validation rule for the given field
HTML_QuickForm::apiVersion()
Returns the current API version
HTML_QuickForm::applyFilter()
Applies a data filter for the given field(s)
HTML_QuickForm::arrayMerge()
Merges two arrays
HTML_QuickForm::createElement()
Creates a new form element of the given type.
HTML_QuickForm::defaultRenderer()
Returns a reference to default renderer object
HTML_QuickForm::elementExists()
Returns true if element is in the form
HTML_QuickForm::errorMessage()
Return a textual error message for an QuickForm error code
HTML_QuickForm::exportValue()
Returns a 'safe' element's value
HTML_QuickForm::exportValues()
Returns 'safe' elements' values
HTML_QuickForm::freeze()
Displays elements without HTML input tags
HTML_QuickForm::getElement()
Returns a reference to the element
HTML_QuickForm::getElementError()
Returns error corresponding to validated element
HTML_QuickForm::getElementType()
Returns the type of the given element
HTML_QuickForm::getElementValue()
Returns the element's raw value
HTML_QuickForm::getMaxFileSize()
Returns the value of MAX_FILE_SIZE hidden element
HTML_QuickForm::getRegisteredRules()
Returns an array of registered validation rules
HTML_QuickForm::getRegisteredTypes()
Returns an array of registered element types
HTML_QuickForm::getRequiredNote()
Returns the required note
HTML_QuickForm::getSubmitValue()
Returns the elements value after submit and filter
HTML_QuickForm::getSubmitValues()
Returns the values submitted by the form
HTML_QuickForm::getValidationScript()
Returns the client side validation script
HTML_QuickForm::insertElementBefore()
Inserts a new element right before the other element
HTML_QuickForm::isElementFrozen()
Returns whether or not the form element is frozen
HTML_QuickForm::isElementRequired()
Returns whether or not the form element is required
HTML_QuickForm::isError()
Tell whether a result from a QuickForm method is an error (an instance of HTML_QuickForm_Error)
HTML_QuickForm::isFrozen()
Returns whether or not the whole form is frozen
HTML_QuickForm::isRuleRegistered()
Returns whether or not the given rule is supported
HTML_QuickForm::isSubmitted()
Tells whether the form was already submitted
HTML_QuickForm::isTypeRegistered()
Returns whether or not the form element type is supported
HTML_QuickForm::process()
Performs the form data processing
HTML_QuickForm::registerElementType()
Registers a new element type
HTML_QuickForm::registerRule()
Registers a new validation rule
HTML_QuickForm::removeElement()
Removes an element
HTML_QuickForm::setConstants()
Initializes constant form values.
HTML_QuickForm::setDatasource()
Sets a datasource object for this form object
HTML_QuickForm::setDefaults()
Initializes default form values
HTML_QuickForm::setElementError()
Set error message for a form element
HTML_QuickForm::setJsWarnings()
Sets JavaScript warning messages
HTML_QuickForm::setMaxFileSize()
Sets the value of MAX_FILE_SIZE hidden element
HTML_QuickForm::setRequiredNote()
Sets required-note
HTML_QuickForm::toArray()
Returns the form's contents in an array.
HTML_QuickForm::toHtml()
Returns an HTML version of the form
HTML_QuickForm::updateElementAttr()
Updates Attributes for one or more elements
HTML_QuickForm::validate()
Performs the server side validation
HTML_QuickForm::_loadElement()
Returns a form element of the given type
HTML_QuickForm::_recursiveFilter()
Recursively apply a filter function
HTML_QuickForm::_reindexFiles()
A helper function to change the indexes in $_FILES array

Class: HTML_Common

HTML_Common::HTML_Common()
Class constructor
HTML_Common::apiVersion()
Returns the current API version
HTML_Common::display()
Displays the HTML to the screen
HTML_Common::getAttribute()
Returns the value of the given attribute
HTML_Common::getAttributes()
Returns the assoc array (default) or string of attributes
HTML_Common::getComment()
Returns the HTML comment
HTML_Common::getTabOffset()
Returns the tabOffset
HTML_Common::removeAttribute()
Removes an attribute
HTML_Common::setAttributes()
Sets the HTML attributes
HTML_Common::setComment()
Sets the HTML comment to be displayed at the beginning of the HTML string
HTML_Common::setLineEnd()
Sets the line end style to Windows, Mac, Unix or a custom string.
HTML_Common::setTab()
Sets the string used to indent HTML
HTML_Common::setTabOffset()
Sets the tab offset
HTML_Common::toHtml()
Abstract method. Must be extended to return the objects HTML
HTML_Common::updateAttributes()
Updates the passed attributes without changing the other existing attributes
HTML_Common::_getAttrKey()
Returns the array key for the given non-name-value pair attribute
HTML_Common::_getAttrString()
Returns an HTML formatted attribute string
HTML_Common::_getLineEnd()
Returns the lineEnd
HTML_Common::_getTab()
Returns a string containing the unit for indenting HTML
HTML_Common::_getTabs()
Returns a string containing the offset for the whole HTML code
HTML_Common::_parseAttributes()
Returns a valid atrributes array from either a string or array
HTML_Common::_removeAttr()
Removes the given attribute from the given array
HTML_Common::_updateAttrArray()
Updates the attributes in $attr1 with the values in $attr2 without changing the other existing attributes

Class Details

[line 13]
Extends formvalidator with add&edit forms



Tags:

author:  Stijn Konings
version:  2.0


[ Top ]


Class Variables

$category_object =

[line 19]



Tags:

access:  private

Type:   mixed


[ Top ]



Class Methods


constructor CatForm [line 28]

CatForm CatForm( int $form_type, obj $category_object, string $form_name, [method $method = 'post'], [ $action = null])

Builds a form containing form items based on a given parameter



Parameters:

int   $form_type   form_type 1=add, 2=edit,3=move,4=browse
obj   $category_object   cat_obj the category object
string   $form_name   form name
method   $method   method
   $action  

[ Top ]

method build_add_form [line 84]

void build_add_form( )

This function builds an 'add category form, if parent id is 0, it will only

show courses




Tags:

access:  protected


[ Top ]

method build_basic_form [line 137]

void build_basic_form( )



Tags:

access:  private


[ Top ]

method build_editing_form [line 121]

void build_editing_form( )

Builds an form to edit a category



Tags:

access:  protected


[ Top ]

method build_move_form [line 59]

void build_move_form( )

This function will build a move form that will allow the user to move a category to

a another




Tags:

access:  protected


[ Top ]

method build_select_course_form [line 159]

void build_select_course_form( )

This function builds an 'select course' form in the add category process,

if parent id is 0, it will only show courses




Tags:

access:  protected


[ Top ]

method display [line 178]

void display( )



Overrides FormValidator::display() (Display the form.)

[ Top ]

method setDefaults [line 183]

void setDefaults( [ $defaults = array ()])



Overrides HTML_QuickForm::setDefaults() (Initializes default form values)

Parameters:

   $defaults  

[ Top ]


Class Constants

TYPE_ADD =  1

[line 15]


[ Top ]

TYPE_EDIT =  2

[line 16]


[ Top ]

TYPE_MOVE =  3

[line 17]


[ Top ]

TYPE_SELECT_COURSE =  4

[line 18]


[ Top ]



Documentation generated on Thu, 12 Jun 2008 13:02:50 -0500 by phpDocumentor 1.4.1