Stud.IP  jlu_4.3 Revision 64286
ClipboardWidget Class Reference
Inheritance diagram for ClipboardWidget:
Inheritance graph
Collaboration diagram for ClipboardWidget:
Collaboration graph

Public Member Functions

 __construct ($allowed_item_classes=[])
 
 clearSessionVariables ()
 
 updateSessionVariables ()
 
 enableDraggableItems ()
 
 disableDraggableItems ()
 
 setReadonly ($readonly=false)
 
 isReadonly ()
 
 setApplyButtonTitle ($title='')
 
 getApplyButtonTitle ()
 
 getClipboardWidgetId ()
 
 render ($variables=[])
 
addLink ($label, $url, $icon=null, $attributes=array(), $index=null)
 
- Public Member Functions inherited from SidebarWidget
 __construct ()
 
 setTitle ($title)
 
 getTitle ()
 
 removeTitle ()
 
 setExtra ($extra)
 
 getExtra ()
 
 removeExtra ()
 
 render ($variables=array())
 
- 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=array())
 
 __isset ($offset)
 
 __get ($offset)
 
 __set ($offset, $value)
 
 __unset ($offset)
 

Protected Attributes

 $allowed_item_class
 
 $draggable_items
 
 $clipboard_widget_id
 
 $current_clipboard_id
 
 $apply_button_title
 
- Protected Attributes inherited from Widget
 $elements = array()
 
 $template = 'widgets/widget'
 
 $template_variables = array()
 
 $layout = 'widgets/widget-layout'
 
 $forced_rendering = false
 
 $layout_css_classes = array()
 

Additional Inherited Members

- Protected Member Functions inherited from Widget
 guessIndex (WidgetElement $element)
 

Detailed Description

This class is responsible for displaying new clipboards (the ones that use the Clipboard SORM class) in the sidebar.

Author
Moritz Strohm stroh.nosp@m.m@da.nosp@m.ta-qu.nosp@m.est..nosp@m.de @license GNU General Public License v2 or later.
Since
4.5

Constructor & Destructor Documentation

◆ __construct()

__construct (   $allowed_item_classes = [])

This widget can be initialised with the class names of allowed classes to limit the displayed items in a clipboard to items of specific classes.

Here is the call graph for this function:

Member Function Documentation

◆ addLink()

& addLink (   $label,
  $url,
  $icon = null,
  $attributes = array(),
  $index = null 
)

Adds a link to the widget

Parameters
String$labelLabel/content of the link
String$urlURL/Location of the link
Icon$iconinstance of class Icon for the link
bool$activePass true if the link is currently active, defaults to false
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearSessionVariables()

clearSessionVariables ( )

◆ disableDraggableItems()

disableDraggableItems ( )

Disables the dragging of clipboard items.

◆ enableDraggableItems()

enableDraggableItems ( )

Enables clipboard items to be dragged to the main area of the page.

◆ getApplyButtonTitle()

getApplyButtonTitle ( )

◆ getClipboardWidgetId()

getClipboardWidgetId ( )

◆ isReadonly()

isReadonly ( )

◆ render()

render (   $variables = [])

Renders the widget. The widget will only be rendered if it contains at least one element.

Returns
String The THML code of the rendered sidebar widget

Reimplemented from SidebarWidget.

Here is the call graph for this function:

◆ setApplyButtonTitle()

setApplyButtonTitle (   $title = '')

◆ setReadonly()

setReadonly (   $readonly = false)

◆ updateSessionVariables()

updateSessionVariables ( )

Updates session variables if a special POST request is made.

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ $allowed_item_class

$allowed_item_class
protected

◆ $apply_button_title

$apply_button_title
protected

This attribute contains a string that shall be the title of the button for applying the selected clipbard to the main area the widget is showing when in read only mode.

◆ $clipboard_widget_id

$clipboard_widget_id
protected

clipboard_widget_id is required in the case that multiple clipboard widgets exist on one page. The JavaScript code can then distinguish each clipboard widget by its unique ID.

◆ $current_clipboard_id

$current_clipboard_id
protected

This attribute holds the ID of the clipboard which is stored in the session as currently selected clipboard.

◆ $draggable_items

$draggable_items
protected

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