Class midcom_helper_datamanager_widget_checkbox

Description

This is a widget for simple boolean fields.

This widget should be used with the boolean type. The widget's value is either true or false, depending on the state of the checkbox in the form. (The PHP "on" value gets converted automagically.)

Configuration parameters:

widget_checkbox_textafter<b>: Set this to true to display the text after the checkbox instead of before the checkbox. <b>Sample configuration

 "checkbox" => array (
     "description" => "Checkbox",
     "datatype" => "boolean",
 ),

CSS Styles in use by the Widget

The checkbox is of the type input.checkbox.

Located in /midcom/helper/datamanager/widget_checkbox.php (line 38)

midcom_helper_datamanager_widget
   |
   --midcom_helper_datamanager_widget_checkbox
Variable Summary
 boolean $_allow_html
 boolean $_textafter
Method Summary
 void draw_view ()
 void draw_widget ()
 void draw_widget_end ()
 void _constructor (mixed &$datamanager, mixed $field, mixed $defaultvalue)
 void _read_formdata ()
Variables
boolean $_allow_html = false (line 52)

check if the HTML should be allowed in a description

  • access: private
boolean $_textafter = true (line 45)

check if the text should be shown before or after the checkbox.

  • access: private

Inherited Variables

Inherited from midcom_helper_datamanager_widget

midcom_helper_datamanager_widget::$missingrequired
midcom_helper_datamanager_widget::$required
midcom_helper_datamanager_widget::$_datamanager
midcom_helper_datamanager_widget::$_field
midcom_helper_datamanager_widget::$_fieldname
midcom_helper_datamanager_widget::$_l10n
midcom_helper_datamanager_widget::$_l10n_midcom
midcom_helper_datamanager_widget::$_value
Methods
draw_view (line 160)
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 165)
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.
draw_widget_end (line 129)

The widget will use a field group to put all related fields together,.

void draw_widget_end ()

Redefinition of:
midcom_helper_datamanager_widget::draw_widget_end()
This is the default widget "introduction" code rendered before the actual field code. It will close the <label> tag.
draw_widget_start (line 97)

This is the default widget "introduction" code rendered before the actual field code. It will open a <label> tag and display the heading.

void draw_widget_start ()

Redefinition of:
midcom_helper_datamanager_widget::draw_widget_start()
This is the default widget "introduction" code rendered before the actual field code. It will open a <label> tag and display the heading.
_constructor (line 54)
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 73)
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:37 +0100 by phpDocumentor 1.3.0RC3