class WidgetContext (View source)

The WidgetContext stores all information a widget needs to know about the environment.

The WidgetContext can be fetched from the current request as internal argument __widgetContext, and is thus available throughout the whole sub-request of the widget. It is used internally by various ViewHelpers (like , , ), to get knowledge over the current widget's configuration.

It is a purely internal class which should not be used outside of Fluid.

Properties

protected string $widgetIdentifier

Uniquely idenfies a Widget Instance on a certain page.

protected string $ajaxWidgetIdentifier

Per-User unique identifier of the widget, if it is an AJAX widget.

protected array $ajaxWidgetConfiguration

User-supplied widget configuration, available inside the widget controller as $this->widgetConfiguration, if being inside an AJAX request

protected array $nonAjaxWidgetConfiguration

User-supplied widget configuration, available inside the widget controller as $this->widgetConfiguration, if being inside a non-AJAX request

protected string $controllerObjectName

The fully qualified object name of the Controller which this widget uses.

protected RootNode $viewHelperChildNodes

The child nodes of the Widget ViewHelper.

protected RenderingContextInterface $viewHelperChildNodeRenderingContext

The rendering context of the ViewHelperChildNodes.

Methods

string
getWidgetIdentifier()

No description

void
setWidgetIdentifier(string $widgetIdentifier)

No description

string
getAjaxWidgetIdentifier()

No description

void
setAjaxWidgetIdentifier(string $ajaxWidgetIdentifier)

No description

array
getWidgetConfiguration()

No description

void
setAjaxWidgetConfiguration(array $ajaxWidgetConfiguration)

No description

void
setNonAjaxWidgetConfiguration(array $nonAjaxWidgetConfiguration)

No description

string
getControllerObjectName()

No description

void
setControllerObjectName(string $controllerObjectName)

No description

void
setViewHelperChildNodes(RootNode $viewHelperChildNodes, RenderingContextInterface $viewHelperChildNodeRenderingContext)

No description

RootNode
getViewHelperChildNodes()

No description

RenderingContextInterface
array
__sleep()

Serialize everything except the viewHelperChildNodes, viewHelperChildNodeRenderingContext and nonAjaxWidgetConfiguration

Details

string getWidgetIdentifier()

No description

Return Value

string

void setWidgetIdentifier(string $widgetIdentifier)

No description

Parameters

string $widgetIdentifier

Return Value

void

string getAjaxWidgetIdentifier()

No description

Return Value

string

void setAjaxWidgetIdentifier(string $ajaxWidgetIdentifier)

No description

Parameters

string $ajaxWidgetIdentifier

Return Value

void

array getWidgetConfiguration()

No description

Return Value

array

void setAjaxWidgetConfiguration(array $ajaxWidgetConfiguration)

No description

Parameters

array $ajaxWidgetConfiguration

Return Value

void

void setNonAjaxWidgetConfiguration(array $nonAjaxWidgetConfiguration)

No description

Parameters

array $nonAjaxWidgetConfiguration

Return Value

void

string getControllerObjectName()

No description

Return Value

string

void setControllerObjectName(string $controllerObjectName)

No description

Parameters

string $controllerObjectName

Return Value

void

void setViewHelperChildNodes(RootNode $viewHelperChildNodes, RenderingContextInterface $viewHelperChildNodeRenderingContext)

No description

Parameters

RootNode $viewHelperChildNodes
RenderingContextInterface $viewHelperChildNodeRenderingContext

Return Value

void

RootNode getViewHelperChildNodes()

No description

Return Value

RootNode

RenderingContextInterface getViewHelperChildNodeRenderingContext()

No description

Return Value

RenderingContextInterface

array __sleep()

Serialize everything except the viewHelperChildNodes, viewHelperChildNodeRenderingContext and nonAjaxWidgetConfiguration

Return Value

array