diff --git a/Documentation/CodeSnippets/Config/Api/Events/All.php b/Documentation/CodeSnippets/Config/Api/Events/All.php index 1570b03989..6a107313d5 100644 --- a/Documentation/CodeSnippets/Config/Api/Events/All.php +++ b/Documentation/CodeSnippets/Config/Api/Events/All.php @@ -10,6 +10,7 @@ include ('EventsExtbase.php'), include ('EventsExtensionManager.php'), include ('EventsFilelist.php'), + include ('EventsFluid.php'), include ('EventsForm.php'), include ('EventsFrontend.php'), include ('EventsFrontendLogin.php'), diff --git a/Documentation/CodeSnippets/Config/Api/Events/EventsFluid.php b/Documentation/CodeSnippets/Config/Api/Events/EventsFluid.php new file mode 100644 index 0000000000..23ec98456c --- /dev/null +++ b/Documentation/CodeSnippets/Config/Api/Events/EventsFluid.php @@ -0,0 +1,40 @@ + 'createPhpClassDocs', + 'class' => \TYPO3\CMS\Fluid\Event\ModifyComponentDefinitionEvent::class, + 'targetFileName' => 'CodeSnippets/Events/Fluid/ModifyComponentDefinitionEvent.rst.txt', + 'withCode' => false, + ], + [ + 'action' => 'createPhpClassDocs', + 'class' => \TYPO3\CMS\Fluid\Event\ModifyNamespacesEvent::class, + 'targetFileName' => 'CodeSnippets/Events/Fluid/ModifyNamespacesEvent.rst.txt', + 'withCode' => false, + ], + [ + 'action' => 'createPhpClassDocs', + 'class' => \TYPO3\CMS\Fluid\Event\ModifyRenderedContentAreaEvent::class, + 'targetFileName' => 'CodeSnippets/Events/Fluid/ModifyRenderedContentAreaEvent.rst.txt', + 'withCode' => false, + ], + [ + 'action' => 'createPhpClassDocs', + 'class' => \TYPO3\CMS\Fluid\Event\ModifyRenderedRecordEvent::class, + 'targetFileName' => 'CodeSnippets/Events/Fluid/ModifyRenderedRecordEvent.rst.txt', + 'withCode' => false, + ], + [ + 'action' => 'createPhpClassDocs', + 'class' => \TYPO3\CMS\Fluid\Event\ProvideStaticVariablesToComponentEvent::class, + 'targetFileName' => 'CodeSnippets/Events/Fluid/ProvideStaticVariablesToComponentEvent.rst.txt', + 'withCode' => false, + ], + [ + 'action' => 'createPhpClassDocs', + 'class' => \TYPO3\CMS\Fluid\Event\RenderComponentEvent::class, + 'targetFileName' => 'CodeSnippets/Events/Fluid/RenderComponentEvent.rst.txt', + 'withCode' => false, + ], +]; diff --git a/Documentation/CodeSnippets/Events/Fluid/ModifyComponentDefinitionEvent.rst.txt b/Documentation/CodeSnippets/Events/Fluid/ModifyComponentDefinitionEvent.rst.txt new file mode 100644 index 0000000000..a4df2a05f2 --- /dev/null +++ b/Documentation/CodeSnippets/Events/Fluid/ModifyComponentDefinitionEvent.rst.txt @@ -0,0 +1,18 @@ +.. Generated by https://github.com/TYPO3-Documentation/t3docs-codesnippets +.. php:namespace:: TYPO3\CMS\Fluid\Event + +.. php:class:: ModifyComponentDefinitionEvent + + Event to modify the static definition of a Fluid component before the + definition is written to cache. The definition must not have any + dependencies on runtime information, such as the request. + + .. php:method:: getNamespace() + :returns: `string` + + .. php:method:: getComponentDefinition() + :returns: `\TYPO3Fluid\Fluid\Core\Component\ComponentDefinition` + + .. php:method:: setComponentDefinition(\TYPO3Fluid\Fluid\Core\Component\ComponentDefinition $componentDefinition) + + :param $componentDefinition: the componentDefinition diff --git a/Documentation/CodeSnippets/Events/Fluid/ModifyNamespacesEvent.rst.txt b/Documentation/CodeSnippets/Events/Fluid/ModifyNamespacesEvent.rst.txt new file mode 100644 index 0000000000..4511b79857 --- /dev/null +++ b/Documentation/CodeSnippets/Events/Fluid/ModifyNamespacesEvent.rst.txt @@ -0,0 +1,14 @@ +.. Generated by https://github.com/TYPO3-Documentation/t3docs-codesnippets +.. php:namespace:: TYPO3\CMS\Fluid\Event + +.. php:class:: ModifyNamespacesEvent + + Event to modify registered global Fluid namespaces before they + are passed to Fluid's ViewHelperResolver. + + .. php:method:: getNamespaces() + :returns: `array` + + .. php:method:: setNamespaces(array $namespaces) + + :param $namespaces: the namespaces diff --git a/Documentation/CodeSnippets/Events/Fluid/ModifyRenderedContentAreaEvent.rst.txt b/Documentation/CodeSnippets/Events/Fluid/ModifyRenderedContentAreaEvent.rst.txt new file mode 100644 index 0000000000..03a85fc5ea --- /dev/null +++ b/Documentation/CodeSnippets/Events/Fluid/ModifyRenderedContentAreaEvent.rst.txt @@ -0,0 +1,26 @@ +.. Generated by https://github.com/TYPO3-Documentation/t3docs-codesnippets +.. php:namespace:: TYPO3\CMS\Fluid\Event + +.. php:class:: ModifyRenderedContentAreaEvent + + Event to modify the rendered content area output. + + This can be used to alter the final HTML of a content area, + for example to render a debug wrapper around it. + + .. php:method:: getRenderedContentArea() + :returns: `string` + + .. php:method:: setRenderedContentArea(string $renderedContentArea) + + Set the rendered content area's HTML. + + Make sure to return escaped content if necessary. + + :param $renderedContentArea: the renderedContentArea + + .. php:method:: getContentArea() + :returns: `\TYPO3\CMS\Core\Page\ContentArea` + + .. php:method:: getRequest() + :returns: `\Psr\Http\Message\ServerRequestInterface` diff --git a/Documentation/CodeSnippets/Events/Fluid/ModifyRenderedRecordEvent.rst.txt b/Documentation/CodeSnippets/Events/Fluid/ModifyRenderedRecordEvent.rst.txt new file mode 100644 index 0000000000..f6261d6c46 --- /dev/null +++ b/Documentation/CodeSnippets/Events/Fluid/ModifyRenderedRecordEvent.rst.txt @@ -0,0 +1,26 @@ +.. Generated by https://github.com/TYPO3-Documentation/t3docs-codesnippets +.. php:namespace:: TYPO3\CMS\Fluid\Event + +.. php:class:: ModifyRenderedRecordEvent + + Event to modify the rendered record output. + + This can be used to alter the final HTML of a record (eg. content element), + for example to render a debug wrapper around it. + + .. php:method:: getRenderedRecord() + :returns: `string` + + .. php:method:: setRenderedRecord(string $renderedRecord) + + Set the rendered record's HTML. + + Make sure to return escaped content if necessary. + + :param $renderedRecord: the renderedRecord + + .. php:method:: getRecord() + :returns: `\TYPO3\CMS\Core\Domain\RecordInterface` + + .. php:method:: getRequest() + :returns: `\Psr\Http\Message\ServerRequestInterface` diff --git a/Documentation/CodeSnippets/Events/Fluid/ProvideStaticVariablesToComponentEvent.rst.txt b/Documentation/CodeSnippets/Events/Fluid/ProvideStaticVariablesToComponentEvent.rst.txt new file mode 100644 index 0000000000..8db473eb74 --- /dev/null +++ b/Documentation/CodeSnippets/Events/Fluid/ProvideStaticVariablesToComponentEvent.rst.txt @@ -0,0 +1,23 @@ +.. Generated by https://github.com/TYPO3-Documentation/t3docs-codesnippets +.. php:namespace:: TYPO3\CMS\Fluid\Event + +.. php:class:: ProvideStaticVariablesToComponentEvent + + Event to provide additional variables to a Fluid component's template. + + These variables should be static and must not have any dependencies on runtime + information, such as the request. Think of these variables as something that + could be provided as static autocomplete in IDEs: Prefixes based on component + name, global design tokens, ... + + .. php:method:: getComponentCollection() + + .. php:method:: getViewHelperName() + :returns: `string` + + .. php:method:: getStaticVariables() + :returns: `array` + + .. php:method:: setStaticVariables(array $staticVariables) + + :param $staticVariables: the staticVariables diff --git a/Documentation/CodeSnippets/Events/Fluid/RenderComponentEvent.rst.txt b/Documentation/CodeSnippets/Events/Fluid/RenderComponentEvent.rst.txt new file mode 100644 index 0000000000..7e3555b2b9 --- /dev/null +++ b/Documentation/CodeSnippets/Events/Fluid/RenderComponentEvent.rst.txt @@ -0,0 +1,55 @@ +.. Generated by https://github.com/TYPO3-Documentation/t3docs-codesnippets +.. php:namespace:: TYPO3\CMS\Fluid\Event + +.. php:class:: RenderComponentEvent + + Event to modify/replace the rendering behavior of Fluid components. + + This can be used both to take over the whole rendering (by filling the + $renderedContent property) and to introduce side effects while leaving + the default rendering intact, like for embedding related frontent assets + automatically. Also, both arguments and slots can be altered. + + The event chain stops with the first listener that takes over the + rendering completely. If no listener stops the chain, Fluid's default + component rendering will be triggered afterwards. + + Note that the provided parentRenderingContext must not be used to + render child templates as this might have side effects on the parent + template. Instead, a new rendering context (or a clone of the parent) + must be used. + + .. php:method:: getComponentCollection() + + .. php:method:: getViewHelperName() + :returns: `string` + + .. php:method:: getParentRenderingContext() + :returns: `\TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface` + + .. php:method:: getRequest() + :returns: `?\Psr\Http\Message\ServerRequestInterface` + + .. php:method:: getArguments() + :returns: `array` + + .. php:method:: setArguments(array $arguments) + + :param $arguments: the arguments + + .. php:method:: getSlots() + :returns: `array` + + .. php:method:: setSlots(array $slots) + + :param $slots: the slots + + .. php:method:: setRenderedComponent(string $renderedComponent) + + :param $renderedComponent: the renderedComponent + + .. php:method:: getRenderedComponent() + :returns: `?string` + + .. php:method:: isPropagationStopped() + :returns: `bool`