|
| | __construct ($url='') |
| |
| | setId ($id) |
| |
| | getId () |
| |
| | setMethod ($method) |
| |
| | getMethod () |
| |
| | addNeedle ($label, $name, $placeholder=false, SearchType $quick_search=null, $js_func=null, $value=null) |
| |
| | addFilter ($label, $key) |
| |
| | hasElements () |
| |
| | render ($variables=array()) |
| |
| | addElement (WidgetElement $element, $index=null) |
| |
| | insertElement (WidgetElement $element, $before_index, $index=null) |
| |
| | getElement ($index) |
| |
| | getElements () |
| |
| | removeElement ($index) |
| |
| | hasElements () |
| |
| | hasElement ($index) |
| |
| | forceRendering ($state=true) |
| |
| | render ($variables=array()) |
| |
| | __isset ($offset) |
| |
| | __get ($offset) |
| |
| | __set ($offset, $value) |
| |
| | __unset ($offset) |
| |
This class provides a generic search widget for the sidebar.
- Author
- Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m
- Since
- 3.1 @license GPL2 or any later version
- Copyright
- Stud.IP Core Group
◆ __construct()
Constructor for the widget.
- Parameters
-
| String | $url | URL to send the search to |
◆ addFilter()
| addFilter |
( |
|
$label, |
|
|
|
$key |
|
) |
| |
Add a filter option. This will create a checkbox with the given key as the name attribute.
- Parameters
-
| String | $label | Label of the filter |
| String | $key | Key/name of the filter (this will be the name attribute) |
◆ addNeedle()
Add a needle to search (optionally as quick search)
- Parameters
-
| String | $label | Label for the input element |
| String | $name | Name of the input (which will be the transmitted name attribute) |
| bool | $placeholder | Use label as placeholder (this will hide the associated label) |
| mixed | $quick_search | An optional SearchType object if quick search should be used |
| mixed | $js_func | Optional name of a js function or a js function itself that's executed when an entry of the found elements is selected |
◆ getId()
Returns the id for the form element.
- Returns
- mixed String containing the id or null if no id has been set.
◆ getMethod()
Returns the request method used for the form.
- Returns
- string containing the chosen request method.
◆ hasData()
Returns whether the widget has any data. The widget has data if it was submitted and any of the needles or needles has been filled out.
- Returns
- bool indicating whether the request method matches and any element has data.
◆ hasElements()
Returns whether the widgets has any elements. Since this widget uses a special template, not all elements are "real" SidebarElements.
- Returns
- bool If widget has any element.
Reimplemented from Widget.
◆ render()
| render |
( |
|
$variables = array() | ) |
|
Renders the widget.
- Parameters
-
| Array | $variables | Unused variables parameter |
- Returns
- String containing the html output of the widget
Reimplemented from SidebarWidget.
◆ setId()
Sets the id for the form element.
◆ setMethod()
Sets the request method used for the form.
◆ $filters
◆ $id
◆ $method
◆ $needles
◆ $url
◆ INDEX
The documentation for this class was generated from the following file: