Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
OptionsWidget Class Reference
Inheritance diagram for OptionsWidget:
ListWidget SidebarWidget Widget

Public Member Functions

 __construct ($title=null)
 
 addCheckbox ($label, $state, $toggle_url, $toggle_url_off=null, array $attributes=[])
 
 addRadioButton ($label, $url, $checked=false, array $attributes=[])
 
 addSelect ($label, $url, $name, $options, $selected_option=false, $attributes=[])
 
- Public Member Functions inherited from ListWidget
 __construct ()
 
 addCSSClass ($css_class)
 
 removeCSSClass ($css_class)
 
 render ($variables=[])
 
- Public Member Functions inherited from SidebarWidget
 __construct ()
 
 setId (string $id)
 
 getId ()
 
 setTitle ($title)
 
 getTitle ()
 
 removeTitle ()
 
 setExtra ($extra)
 
 getExtra ()
 
 removeExtra ()
 
 setAdditionalAttribute (string $key, $value)
 
 setAdditionalAttributes (array $attributes)
 
 removeAdditionalAttribute (string $key)
 
 render ($variables=[])
 
- Public Member Functions inherited from Widget
 addElement (WidgetElement $element, $index=null)
 
 insertElement (WidgetElement $element, $before_index, $index=null)
 
 getElement ($index)
 
 getElements ()
 
 removeElement ($index)
 
 hasElements ()
 
 hasElement ($index)
 
 forceRendering ($state=true)
 
 addLayoutCSSClass ($css_class)
 
 removeLayoutCSSClass ($css_class)
 
 render ($variables=[])
 
 __isset ($offset)
 
 __get ($offset)
 
 __set ($offset, $value)
 
 __unset ($offset)
 

Data Fields

const INDEX = 'options'
 

Additional Inherited Members

- Protected Member Functions inherited from Widget
 guessIndex (WidgetElement $element)
 
- Protected Attributes inherited from ListWidget
 $css_classes = []
 
- Protected Attributes inherited from SidebarWidget
 $additional_attributes = []
 
- Protected Attributes inherited from Widget
 $elements = []
 
 $template = 'widgets/widget'
 
 $template_variables = []
 
 $layout = 'widgets/widget-layout'
 
 $forced_rendering = false
 
 $layout_css_classes = []
 

Detailed Description

Author
Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m GPL2 or any later version

Constructor & Destructor Documentation

__construct (   $title = null)
Parameters
String$titleOptional alternative title

Member Function Documentation

addCheckbox (   $label,
  $state,
  $toggle_url,
  $toggle_url_off = null,
array  $attributes = [] 
)
Parameters
String$label
bool$state
String$toggle_urlUrl to execute the action
String$toggle_url_offOptional alternative url to explicitely turn off the checkbox ($toggle_url will then act as $toggle_url_on)
Array$attributesOptional additional attributes for the anchor
addRadioButton (   $label,
  $url,
  $checked = false,
array  $attributes = [] 
)
Parameters
String$label
String$url
bool$checked
addSelect (   $label,
  $url,
  $name,
  $options,
  $selected_option = false,
  $attributes = [] 
)

Adds a select element to the widget.

Parameters
String$label
String$url
String$nameAttribute name
array$optionsArray of associative options (value => label)
mixed$selected_optionCurrently selected option
array$attributesAdditional attributes

Field Documentation

const INDEX = 'options'

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