Umfragen
checkBoxList Class Reference
Inheritance diagram for checkBoxList:
buttonListContainer iWidget input_widget output_widget countable_widget chartable_widget container widget

Public Member Functions

 __construct ()
 get_config ($name)
 gets an config variable or it's default value
 set_config ($name, $val)
 sets a config variable
 check_required ()
 set_default_values ($db)
 sets default values and childs. Used when creating a new widget
 display_edit ()
 prints a widget on screen with edit buttons for the edit page
 display ()
 prints a widget on screen
 handle_inpt ()
 handles the answer to a question on form submit. Sets the values and generates error messages
 count ($db)
 counts results
 chart_make ()
 makes the chartobject and loads count. Must be executed before any chart action
 chart_format_data_doughnutChart ()
 formats the count data to be displayed with a doughnutChart
 chart_format_data_radarChart ()
 formats the count data to be displayed with a radarChart
 chart_format_data ()
 formats data for charting
 chart_display_legend ()
 displays the legend for the chart
 chart_display_chart ()
 display only the chart
 chart_display ()
 display legend and the chart
- Public Member Functions inherited from buttonListContainer
 display_chartType_edit ()
 handle_chartType_edit ()
 display_columns_edit ()
 handle_columns_edit ()
 display_show_charts_edit ()
 handle_show_charts_edit ()
 rotate_option_list ()
 uses the "br" tags in the options to make a column based table
- Public Member Functions inherited from container
 get_option_by_id ($ID)
 gets an option from the container::option_list by ID
 get_widget_by_id ($ID)
 gets a widget from the container::widget_list by ID
 get_all_childs ()
 gets a list of all child widgets and options
 set_options ($options)
 sets a list of options
 set_widgets ($widgets)
 sets a list of child widgets
 insert_option ($index=-1, &$opt)
 inserts an option into container::option_list
 insert_widget ($index=-1, &$opt)
 inserts a widget into container::widget_list
 delete_option ($db, $id)
 deletes an option
 delete_widget ($db, $id)
 deletes a widget
 move_option ($db, $index1, $index2)
 moves an option from one index to another
 move_widget ($db, $index1, $index2)
 moves a widget from one index to another
 display_option_list_edit ($polltype)
 prints the edit form for the option list.
 handle_option_list_edit ()
 handles the edit form for the option list.
 save_option_list ($db)
 saves the option list to database using db::mass_update_widget()
 save_widget_list ($db)
 saves the widget list to database using db::mass_update_widget()
- Public Member Functions inherited from widget
 serialize_config ()
 makes a string (php serializer) of the widget config and stores it in widget::config
 unserialize_config ()
 takes widget::config in string form (php serializer) and makes an array
 init_config ()
 initialise config. unserialize when necessary
 set_data ($name, $val)
 sets a data variable. Data is meant for non persistend data storage such as count
 get_data ($name)
 gets a data variable or it's default value
 check_vital_vars ()
 checks if widget::typ widget::name widget::index and widget::pollID are set
 check_max ()
 checks if a maximum limit of different answers to a question has been exceeded
 set_dispName ($dispName)
 sets widget's display name by escaping html characters ant checking for a maximum length of 256 chars
 set_name ($name)
 sets widget's name. Max 25 chars. Sets the widget's ID if input is empty
 display_edit_begin ()
 prints edit toolbar and widget container div for a widget. Used as link to widget's edit page
 display_name_edit ()
 prints edit widget name
 handle_name_edit ()
 handles widget name edit and sets widget::name
 display_dispName_edit ()
 prints display name edit
 handle_dispName_edit ()
 handles widget display name edit and sets widget:: dispName
 display_required_edit ()
 prints widget is_required checkbox edit
 handle_required_edit ()
 handles widget is_required checkbox edit and sets widget::is_required
 display_chartType_edit_generic ($allowed, $allowed_names)
 prints widget chart type select edit
 handle_chartType_edit_generic ($allowed)
 handles widget chart type select edit and sets config value
 save_config ($db)
 saves the widget config array to database
 save_dispName ($db)
 saves the widget's display name widget::dispName
 save_required ($db)
 saves the widget's is required widget::is_required
 save_name ($db, $new_name)
 sets the widget's name in the result table and the widget table
- Public Member Functions inherited from iWidget
 serialize_config ()
 unserialize_config ()
 check_vital_vars ()
 check_max ()
 set_dispName ($dispName)
 set_name ($name)
 display_edit_begin ()
 display_name_edit ()
 handle_name_edit ()
 display_dispName_edit ()
 handle_dispName_edit ()
 display_required_edit ()
 handle_required_edit ()
 display_chartType_edit_generic ($allowed, $allowed_names)
 handle_chartType_edit_generic ($allowed)
 save_config ($db)
 save_dispName ($db)
 save_required ($db)
 save_name ($db, $new_name)

Data Fields

 $typ = "checkBoxList"
 $direct_result = true
 $long_result = true
 $child_widgets_whitelist = array()
 defines a whitelist of widgettypes "*" means all widgets
 $child_options_whitelist = array("checkBox")
 defines a whitelist of widgettypes "*" means all widgets
 $option_list = array()

Private Member Functions

 chart_format_data_barChart ()
 formats the count data to be displayed with a barChart
 chart_format_data_pieChart ()
 formats the count data to be displayed with a pieChart
 chart_display_legend_barChart ()
 displays the legend for barChart
 chart_display_legend_radarChart ()
 displays the legend for radarChart
 chart_display_legend_pieChart ()
 displays the legend for pieChart
 chart_display_legend_doughnutChart ()
 displays the legend for doughnutChart

Detailed Description

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

Constructor & Destructor Documentation

__construct ( )

Reimplemented from container.

Definition at line 15 of file checkBoxList.class.php.

Member Function Documentation

chart_display ( )

display legend and the chart

Implements chartable_widget.

Definition at line 418 of file checkBoxList.class.php.

chart_display_chart ( )

display only the chart

Implements chartable_widget.

Definition at line 409 of file checkBoxList.class.php.

chart_display_legend ( )

displays the legend for the chart

Implements chartable_widget.

Definition at line 390 of file checkBoxList.class.php.

chart_display_legend_barChart ( )
private

displays the legend for barChart

Definition at line 339 of file checkBoxList.class.php.

chart_display_legend_doughnutChart ( )
private

displays the legend for doughnutChart

Definition at line 385 of file checkBoxList.class.php.

chart_display_legend_pieChart ( )
private

displays the legend for pieChart

Definition at line 364 of file checkBoxList.class.php.

chart_display_legend_radarChart ( )
private

displays the legend for radarChart

Definition at line 357 of file checkBoxList.class.php.

chart_format_data ( )

formats data for charting

Returns
array of formatted data

Implements chartable_widget.

Definition at line 315 of file checkBoxList.class.php.

chart_format_data_barChart ( )
private

formats the count data to be displayed with a barChart

Returns
array formatted for input into barChart

Definition at line 277 of file checkBoxList.class.php.

chart_format_data_doughnutChart ( )

formats the count data to be displayed with a doughnutChart

Returns
array formatted for input into doughnutChart

Definition at line 302 of file checkBoxList.class.php.

chart_format_data_pieChart ( )
private

formats the count data to be displayed with a pieChart

Returns
array formatted for input into pieChart

Definition at line 290 of file checkBoxList.class.php.

chart_format_data_radarChart ( )

formats the count data to be displayed with a radarChart

Returns
array formatted for input into radarChart

Definition at line 310 of file checkBoxList.class.php.

chart_make ( )

makes the chartobject and loads count. Must be executed before any chart action

Implements chartable_widget.

Definition at line 248 of file checkBoxList.class.php.

check_required ( )
See Also
widget::check_required()

Implements iWidget.

Definition at line 39 of file checkBoxList.class.php.

count (   $db)

counts results

Parameters
db$dbdatabase object

executes SQL through the database class individually for each widgettype a data "count" enty is created

Implements countable_widget.

Definition at line 201 of file checkBoxList.class.php.

display ( )

prints a widget on screen

Implements output_widget.

Definition at line 122 of file checkBoxList.class.php.

display_edit ( )

prints a widget on screen with edit buttons for the edit page

Implements iWidget.

Definition at line 84 of file checkBoxList.class.php.

get_config (   $name)

gets an config variable or it's default value

Parameters
string$namevariable name
Returns
mixed config

Reimplemented from buttonListContainer.

Definition at line 18 of file checkBoxList.class.php.

handle_inpt ( )

handles the answer to a question on form submit. Sets the values and generates error messages

Returns
bool true on success, else error string

Implements input_widget.

Definition at line 166 of file checkBoxList.class.php.

set_config (   $name,
  $val 
)

sets a config variable

Parameters
string$nameconfigvar name to be set
mixed$valvalue to be set
Returns
true if success else error string

Reimplemented from buttonListContainer.

Definition at line 27 of file checkBoxList.class.php.

set_default_values (   $db)

sets default values and childs. Used when creating a new widget

Implements iWidget.

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

Field Documentation

$child_options_whitelist = array("checkBox")

defines a whitelist of widgettypes "*" means all widgets

Definition at line 10 of file checkBoxList.class.php.

$child_widgets_whitelist = array()

defines a whitelist of widgettypes "*" means all widgets

Definition at line 9 of file checkBoxList.class.php.

$direct_result = true

Definition at line 7 of file checkBoxList.class.php.

$long_result = true

Definition at line 8 of file checkBoxList.class.php.

$option_list = array()

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

$typ = "checkBoxList"

Definition at line 6 of file checkBoxList.class.php.


The documentation for this class was generated from the following file: