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

Public Member Functions

 define_form (&$form)
 define_form_common (&$form)
 define_form_specific (&$form)
 define_validate ($data, $files)
 define_validate_common ($data, $files)
 define_validate_specific ($data, $files)
 define_after_data (&$mform)
 define_save ($data)
 define_save_preprocess ($data)
 define_editors ()

Detailed Description

Definition at line 3 of file definelib.php.


Member Function Documentation

define_after_data ( &$  mform)

Alter form based on submitted or existing data

Parameters:
objectform

do nothing - overwrite if necessary

Definition at line 129 of file definelib.php.

Provides a method by which we can allow the default data in profile_define_* to use an editor

This should return an array of editor names (which will need to be formatted/cleaned)

Returns:
array

Reimplemented in profile_define_textarea.

Definition at line 182 of file definelib.php.

define_form ( &$  form)

Prints out the form snippet for creating or editing a profile field

Parameters:
objectinstance of the moodleform class

Definition at line 9 of file definelib.php.

Here is the call graph for this function:

define_form_common ( &$  form)

Prints out the form snippet for the part of creating or editing a profile field common to all data types

Parameters:
objectinstance of the moodleform class

Definition at line 22 of file definelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

define_form_specific ( &$  form)

Prints out the form snippet for the part of creating or editing a profile field specific to the current data type

Parameters:
objectinstance of the moodleform class

do nothing - overwrite if necessary

Reimplemented in profile_define_checkbox, profile_define_menu, profile_define_text, and profile_define_textarea.

Definition at line 61 of file definelib.php.

Here is the caller graph for this function:

define_save ( data)

Add a new profile field or save changes to current field

Parameters:
objectdata from the add/edit profile field form
Returns:
boolean status of the insert/update record

hook for child classes

check to see if the category has changed

Definition at line 138 of file definelib.php.

Here is the call graph for this function:

Preprocess data from the add/edit profile field form before it is saved. This method is a hook for the child classes to overwrite.

Parameters:
objectdata from the add/edit profile field form
Returns:
object processed data object

do nothing - overwrite if necessary

Reimplemented in profile_define_datetime, and profile_define_menu.

Definition at line 169 of file definelib.php.

Here is the caller graph for this function:

define_validate ( data,
files 
)

Validate the data from the add/edit profile field form. Generally this method should not be overwritten by child classes.

Parameters:
objectdata from the add/edit profile field form
Returns:
array associative array of error messages

Definition at line 72 of file definelib.php.

Here is the call graph for this function:

define_validate_common ( data,
files 
)

Validate the data from the add/edit profile field form that is common to all data types. Generally this method should not be overwritten by child classes.

Parameters:
objectdata from the add/edit profile field form
Returns:
array associative array of error messages

Check the shortname was not truncated by cleaning

Fetch field-record from DB

Check the shortname is unique

No further checks necessary as the form class will take care of it

Definition at line 90 of file definelib.php.

Here is the caller graph for this function:

define_validate_specific ( data,
files 
)

Validate the data from the add/edit profile field form that is specific to the current data type

Parameters:
objectdata from the add/edit profile field form
Returns:
array associative array of error messages

do nothing - overwrite if necessary

Reimplemented in profile_define_menu.

Definition at line 120 of file definelib.php.

Here is the caller graph for this function:


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