WidgetSets\Extensions\WidgetSetContentControllerExtension
ContentController extension to add {@link WidgetSet} controller functions.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class WidgetSetContentControllerExtension
extends Extension
{
- // members
- private static array $allowed_actions = ;
- protected array $widgetOutput = ;
- protected SS_List $WidgetSetSidebarControllers;
- protected SS_List $WidgetSetContentControllers;
- // methods
- public void onBeforeInit()
- public void saveWidgetOutput()
- public string getWidgetOutput()
- public string InsertWidgetArea()
- public RequestHandler handleWidgetSet()
- protected boolean findWidget()
Hierarchy
Extends
- SilverStripe\Core\Extension
Members
private
- $allowed_actions
—
array
List of allowed actions.
protected
- $WidgetSetContentControllers
—
SilverStripe\ORM\SS_List
Contains the controllers for the content area widget - $WidgetSetSidebarControllers
—
SilverStripe\ORM\SS_List
Contains the controllers for the sidebar widgets - $widgetOutput
—
array
Contains the output of all WidgetSets of the parent page
Methods
protected
- findWidget() — Looks for the {@link \SilverStripe\Widgets\Model\Widget} with the given ID within the related {@link WidgetSet} of $widgetOwner.
public
- InsertWidgetArea() — Returns the HTML Code as string for all widgets in the given WidgetArea.
- getWidgetOutput() — returns the rendered widgetOutput for the given widget key
- handleWidgetSet() — Handles widgets attached to a page through one or more {@link WidgetSet} elements.
- onBeforeInit() — load widget controller
- saveWidgetOutput() — Adds a widget output to the class variable "$this->widgetOutput".