Generic widget container
- Author
 - Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m @license GPL 2 or later 
 
- Since
 - 3.1 @abstract 
 
 
◆ __construct()
◆ addWidget()
      
        
          | addWidget  | 
          ( | 
          Widget  | 
          $widget,  | 
        
        
           | 
           | 
            | 
          $index = null  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Add a widget to the container.
- Parameters
 - 
  
    | Widget | $widget | The actual widget  | 
    | String | $index | Optional index/name of the widget, defaults to class name without "widget"  | 
  
   
- Returns
 - Widget The added widget to allow for easier handling 
 
 
 
◆ Get()
Returns the instance of this container to ensure there is only one instance.
- Returns
 - WidgetContainer The container instance 
 
 
 
◆ getWidget()
Retrieve the widget at the specified position.
- Parameters
 - 
  
    | String | $index | Index/name of the widget to retrieve.  | 
  
   
- Returns
 - WidgetElement The widget at the specified position. 
 
- Exceptions
 - 
  
    | Exception | if the specified position is invalid  | 
  
   
 
 
◆ getWidgets()
Returns all widgets of the container.
- Returns
 - array of Widget 
 
 
 
◆ hasWidget()
Returns whether a widget exists at the given index.
- Parameters
 - 
  
    | String | $index | Index/name of the widget to check for.  | 
  
   
- Returns
 - bool Does a widget exist at the given index? 
 
 
 
◆ hasWidgets()
Returns whether this container has any widget.
- Returns
 - bool True if the container has at least one widget, false otherwise. 
 
 
 
◆ insertWidget()
      
        
          | insertWidget  | 
          ( | 
          Widget  | 
          $widget,  | 
        
        
           | 
           | 
            | 
          $before_index,  | 
        
        
           | 
           | 
            | 
          $index = null  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Insert a widget before a specific other widget or at the end of the list if the specified position is invalid.
- Parameters
 - 
  
    | Widget | $widget | The actual widget  | 
    | String | $before_index | Insert widget before this widget  | 
    | String | $index | Optional index/name of the widget, defaults to class name without "widget"  | 
  
   
- Returns
 - Widget The inserted widget to allow for easier handling 
 
 
 
◆ removeWidget()
Removes the widget at the specified position.
- Parameters
 - 
  
    | String | $index | Index/name of the widget to remove.  | 
  
   
- Exceptions
 - 
  
    | Exception | if the specified position is invalid  | 
  
   
 
 
◆ render()
Renders the container.
@abstract 
Reimplemented in Helpbar, and Sidebar.
 
 
◆ $instances
The singleton instance of the container 
 
 
◆ $widgets
Contains the widgets of the container 
 
 
The documentation for this class was generated from the following file: