PHP Class Neos\FluidAdaptor\Core\Widget\AbstractWidgetViewHelper

Inheritance: extends Neos\FluidAdaptor\Core\ViewHelper\AbstractViewHelper, implements Neos\FluidAdaptor\Core\ViewHelper\Facets\ChildNodeAccessInterface
Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$ajaxWidget boolean If set to TRUE, it is an AJAX widget.
$controller AbstractWidgetController This needs to be filled by the individual subclass using property injection.
$escapeOutput boolean
$storeConfigurationInSession boolean You then need to manually add the serialized configuration data to your links, by setting "includeWidgetContext" to TRUE in the widget link and URI ViewHelpers.

Méthodes publiques

Méthode Description
compile ( string $argumentsName, string $closureName, string &$initializationPhpCode, TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ViewHelperNode $node, TYPO3Fluid\Fluid\Core\Compiler\TemplateCompiler $compiler ) : string
initializeArguments ( ) : void Registers the widgetId viewhelper
initializeArgumentsAndRender ( ) : string Initialize the arguments of the ViewHelper, and call the render() method of the ViewHelper.
injectAjaxWidgetContextHolder ( AjaxWidgetContextHolder $ajaxWidgetContextHolder ) : void
injectWidgetContext ( WidgetContext $widgetContext ) : void
resetState ( ) : void Resets the ViewHelper state by creating a fresh WidgetContext
setChildNodes ( array $childNodes ) : void Stores the syntax tree child nodes in the Widget Context, so they can be rendered with lateron.

Méthodes protégées

Méthode Description
getAjaxWidgetConfiguration ( ) : array Generate the configuration for this widget in AJAX context.
getNonAjaxWidgetConfiguration ( ) : array Generate the configuration for this widget in non-AJAX context.
getWidgetConfiguration ( ) : array Generate the configuration for this widget. Override to adjust.
initiateSubRequest ( ) : Response Initiate a sub request to $this->controller. Make sure to fill $this->controller via Dependency Injection.

Private Methods

Méthode Description
initializeWidgetContext ( ) : void Initialize the Widget Context, before the Render method is called.
initializeWidgetIdentifier ( ) : void The widget identifier is unique on the current page, and is used in the URI as a namespace for the widget's arguments.
passArgumentsToSubRequest ( ActionRequest $subRequest ) : void Pass the arguments of the widget to the sub request.

Method Details

compile() public méthode

public compile ( string $argumentsName, string $closureName, string &$initializationPhpCode, TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ViewHelperNode $node, TYPO3Fluid\Fluid\Core\Compiler\TemplateCompiler $compiler ) : string
$argumentsName string
$closureName string
$initializationPhpCode string
$node TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ViewHelperNode
$compiler TYPO3Fluid\Fluid\Core\Compiler\TemplateCompiler
Résultat string

getAjaxWidgetConfiguration() protected méthode

By default, returns getWidgetConfiguration(). Should become API later.
protected getAjaxWidgetConfiguration ( ) : array
Résultat array

getNonAjaxWidgetConfiguration() protected méthode

By default, returns getWidgetConfiguration(). Should become API later.
protected getNonAjaxWidgetConfiguration ( ) : array
Résultat array

getWidgetConfiguration() protected méthode

Generate the configuration for this widget. Override to adjust.
protected getWidgetConfiguration ( ) : array
Résultat array

initializeArguments() public méthode

Registers the widgetId viewhelper
public initializeArguments ( ) : void
Résultat void

initializeArgumentsAndRender() public méthode

Initialize the arguments of the ViewHelper, and call the render() method of the ViewHelper.
public initializeArgumentsAndRender ( ) : string
Résultat string the rendered ViewHelper.

initiateSubRequest() protected méthode

Initiate a sub request to $this->controller. Make sure to fill $this->controller via Dependency Injection.
protected initiateSubRequest ( ) : Response
Résultat Neos\Flow\Http\Response the response of this request.

injectAjaxWidgetContextHolder() public méthode

public injectAjaxWidgetContextHolder ( AjaxWidgetContextHolder $ajaxWidgetContextHolder ) : void
$ajaxWidgetContextHolder AjaxWidgetContextHolder
Résultat void

injectWidgetContext() public méthode

public injectWidgetContext ( WidgetContext $widgetContext ) : void
$widgetContext WidgetContext
Résultat void

resetState() public méthode

Resets the ViewHelper state by creating a fresh WidgetContext
public resetState ( ) : void
Résultat void

setChildNodes() public méthode

Stores the syntax tree child nodes in the Widget Context, so they can be rendered with lateron.
public setChildNodes ( array $childNodes ) : void
$childNodes array The SyntaxTree Child nodes of this ViewHelper.
Résultat void

Property Details

$ajaxWidget protected_oe property

If set to TRUE, it is an AJAX widget.
protected bool $ajaxWidget
Résultat boolean

$controller protected_oe property

This needs to be filled by the individual subclass using property injection.
protected AbstractWidgetController,Neos\FluidAdaptor\Core\Widget $controller
Résultat AbstractWidgetController

$escapeOutput protected_oe property

protected bool $escapeOutput
Résultat boolean

$storeConfigurationInSession protected_oe property

You then need to manually add the serialized configuration data to your links, by setting "includeWidgetContext" to TRUE in the widget link and URI ViewHelpers.
protected bool $storeConfigurationInSession
Résultat boolean