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

Public Member Functions

 profile_field_menu ($fieldid=0, $userid=0)
 edit_field_add (&$mform)
 edit_field_set_default (&$mform)
 edit_save_data_preprocess ($key)
 edit_load_user_data (&$user)
 edit_field_set_locked (&$mform)

Data Fields

 $options
 $datakey

Detailed Description

Definition at line 3 of file field.class.php.


Member Function Documentation

edit_field_add ( &$  mform)

Create the code snippet for this field instance Overwrites the base class method

Parameters:
objectmoodleform instance

Reimplemented from profile_field_base.

Definition at line 37 of file field.class.php.

Here is the call graph for this function:

edit_field_set_default ( &$  mform)

Set the default value for this field instance Overwrites the base class method

Reimplemented from profile_field_base.

Definition at line 45 of file field.class.php.

edit_field_set_locked ( &$  mform)

HardFreeze the field if locked.

Parameters:
objectinstance of the moodleform class

Reimplemented from profile_field_base.

Definition at line 78 of file field.class.php.

Here is the call graph for this function:

edit_load_user_data ( &$  user)

When passing the user object to the form class for the edit profile page we should load the key for the saved data Overwrites the base class method

Parameters:
objectuser object

Reimplemented from profile_field_base.

Definition at line 70 of file field.class.php.

The data from the form returns the key. This should be converted to the respective option string to be saved in database Overwrites base class accessor method

Parameters:
integerthe key returned from the select input in the form

Definition at line 60 of file field.class.php.

profile_field_menu ( fieldid = 0,
userid = 0 
)

Constructor method. Pulls out the options for the menu from the database and sets the the corresponding key for the data if it exists

Param 1 for menu type is the options

Set the data key

Definition at line 12 of file field.class.php.

Here is the call graph for this function:


Field Documentation

$datakey

Definition at line 5 of file field.class.php.

$options

Definition at line 4 of file field.class.php.


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