Stud.IP  5.4
ClipboardWidget Class Reference
Inheritance diagram for ClipboardWidget:
SidebarWidget Widget RoomClipboardWidget

Public Member Functions

 __construct ($allowed_item_classes=[])
 
 updateSessionVariables ()
 
 setApplyButtonTitle ($title='')
 
 getClipboardWidgetId ()
 
 render ($variables=[])
 
addLink ($label, $url, $icon=null, $attributes=array(), $index=null)
 
- 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)
 

Protected Attributes

 $draggable_items
 
 $clipboard_widget_id
 
 $current_clipboard_id
 
 $apply_button_title
 
- 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 = []
 

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 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.

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

◆ getClipboardWidgetId()

getClipboardWidgetId ( )

◆ render()

render (   $variables = [])

◆ setApplyButtonTitle()

setApplyButtonTitle (   $title = '')

◆ updateSessionVariables()

updateSessionVariables ( )

Updates session variables if a special POST request is made.

Field Documentation

◆ $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: