Class midcom_helper_datamanager_widget_multiselect

Description

This is a widget to handle image variable-height multi-selection lists.

This widget can only be used with the multiselect type.

Configuration parameters:

multiselect_selection_list: This option is mandatory and has to contain the selection list. The keys of the arrays are stored into the field, while the value is shown to the user in the forms.

Note, that the various select helper frunctions from helper_select_lists.php can be used here.

widget_select_size: This is the height of the widget, in lines. If omitted, the default 5 is used.

Sample configuration

 "multiselect" => array (
     "description" => "Multi-Select list",
     "datatype" => "multiselect",
     "multiselect_selection_list" => Array (
         "opt1" => "Option 1",
         "opt2" => "Option 2"
     ),
     "widget_select_size" => 10,
 ),

CSS Styles in use by the Widget

The select widget will be both of select.list and select.multiple.

Located in /midcom/helper/datamanager/widget_multiselect.php (line 48)

midcom_helper_datamanager_widget
   |
   --midcom_helper_datamanager_widget_multiselect
Variable Summary
 Array $_choices
 int $_size
Method Summary
 void draw_view ()
 void draw_widget ()
 void set_value (mixed $value)
 void _constructor (mixed &$datamanager, mixed $field, mixed $defaultvalue)
 void _read_formdata ()
Variables
Methods
draw_view (line 83)
void draw_view ()

Redefinition of:
midcom_helper_datamanager_widget::draw_view()
Wenn called, this method should display the current data without any editing widget.
draw_widget (line 92)
void draw_widget ()

Redefinition of:
midcom_helper_datamanager_widget::draw_widget()
This method draws the HTML-Form widgets required to edit the data. This can be anything from a single form tag to a full list of them. Note, that you will be automatically enclosed within the calls to draw_widget_start and draw_widget_end.
set_value (line 119)
void set_value (mixed $value)

Redefinition of:
midcom_helper_datamanager_widget::set_value()
Set the value of the widget.
_constructor (line 66)
void _constructor (mixed &$datamanager, mixed $field, mixed $defaultvalue)

Redefinition of:
midcom_helper_datamanager_widget::_constructor()
The constructor populates the internal members with a reference to the datamanger we belong to, the definition of the field we use and the default value we should use to initialize the widget's data.
_read_formdata (line 108)
void _read_formdata ()

Redefinition of:
midcom_helper_datamanager_widget::_read_formdata()
Reads the HTTP POST request data if available.

Inherited Methods

Inherited From midcom_helper_datamanager_widget

 midcom_helper_datamanager_widget::midcom_helper_datamanager_widget()
 midcom_helper_datamanager_widget::draw_helptext()
 midcom_helper_datamanager_widget::draw_view()
 midcom_helper_datamanager_widget::draw_widget()
 midcom_helper_datamanager_widget::draw_widget_end()
 midcom_helper_datamanager_widget::draw_widget_start()
 midcom_helper_datamanager_widget::get_css_classes_required()
 midcom_helper_datamanager_widget::get_value()
 midcom_helper_datamanager_widget::set_value()
 midcom_helper_datamanager_widget::_constructor()
 midcom_helper_datamanager_widget::_read_formdata()

Documentation generated on Mon, 21 Nov 2005 18:24:50 +0100 by phpDocumentor 1.3.0RC3