Umfragen
line Class Reference
Inheritance diagram for line:
widget iWidget output_widget

Public Member Functions

 set_default_values ($db)
 sets default values and childs. Used when creating a new widget
 set_value ($value, $type="hr")
 get_value ($name)
 display_type_edit ()
 handle_type_edit ()
 display_space_edit ()
 handle_space_edit ()
 display_color_edit ()
 handle_color_edit ()
 save_line ($db)
 display_edit ()
 prints a widget on screen with edit buttons for the edit page
 display ()
 prints a widget on screen
 handle_inpt ()
- 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_config ($name, $val)
 sets a config variable
 get_config ($name)
 gets an config variable or it's default value
 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_required ()
 checks if widget's name is in $_POST (question answered) if the widget is a required question
 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 ()
 set_config ($name, $val)
 get_config ($name)
 check_vital_vars ()
 check_required ()
 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 = "line"
 $direct_result = true
 $colors
 $spaces = array('0.5','1','2')
- Data Fields inherited from widget
 $pollID
 ID of the poll the widget belongs to.
 $name
 The name of the widget, used for columname in the result table. Using the widget's ID in simple poll mode.
 $value
 Place to store data. For output_widget it's the shown data, for input_widget it's the result data.
 $config
 Config array, can be serialized as string.
 $is_required = false
 Is the widget a required question?
 $dispName
 User friendly name for the widget. Used to ask the question.
 $index
 Index in the widget_list.
 $ID
 widget's ID
 $is_child = false
 is the widget a child of another widget or a child of a poll?
 $parent = -1
 the parent's ID if the widget is a child
 $long_result = false
 $direct_result = true
 widget has a row in the result table

Detailed Description

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

Member Function Documentation

display ( )

prints a widget on screen

Implements output_widget.

Definition at line 240 of file line.class.php.

display_color_edit ( )

Definition at line 163 of file line.class.php.

display_edit ( )

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

Implements iWidget.

Definition at line 223 of file line.class.php.

display_space_edit ( )

Definition at line 117 of file line.class.php.

display_type_edit ( )

Definition at line 92 of file line.class.php.

get_value (   $name)

Definition at line 64 of file line.class.php.

handle_color_edit ( )

Definition at line 198 of file line.class.php.

handle_inpt ( )

Definition at line 250 of file line.class.php.

handle_space_edit ( )

Definition at line 143 of file line.class.php.

handle_type_edit ( )

Definition at line 106 of file line.class.php.

save_line (   $db)

Definition at line 218 of file line.class.php.

set_default_values (   $db)

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

Implements iWidget.

Definition at line 23 of file line.class.php.

set_value (   $value,
  $type = "hr" 
)

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

Field Documentation

$colors
Initial value:
array(
'#000000',
'#eeeeec','#d3d7cf','#babdb6',
'#888a85','#555753','#2e3436',
'#fce94f','#edd400','#c4a000',
'#fcaf3e','#f57900','#ce5c00',
'#e9b96e','#c17d11','#8f5902',
'#8ae234','#73d216','#4e9a06',
'#729fcf','#3465a4','#204a87',
'#ad7fa8','#75507b','#5c3566',
'#ef2929','#cc0000','#a40000' )

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

$direct_result = true

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

$spaces = array('0.5','1','2')

Definition at line 21 of file line.class.php.

$typ = "line"

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


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