Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Documentation/CodeSnippets/Config/Api/Events/All.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
40 changes: 40 additions & 0 deletions Documentation/CodeSnippets/Config/Api/Events/EventsFluid.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

return [
[
'action' => '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,
],
];
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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<string,string[]>`

.. php:method:: setNamespaces(array $namespaces)

:param $namespaces: the namespaces
Original file line number Diff line number Diff line change
@@ -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`
Original file line number Diff line number Diff line change
@@ -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`
Original file line number Diff line number Diff line change
@@ -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<string,mixed>`

.. php:method:: setStaticVariables(array $staticVariables)

:param $staticVariables: the staticVariables
Original file line number Diff line number Diff line change
@@ -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<string,mixed>`

.. php:method:: setArguments(array $arguments)

:param $arguments: the arguments

.. php:method:: getSlots()
:returns: `array<string,callable>`

.. 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`