AfterSectionMarkupGeneratedEvent
Deprecated since version 14.3
The event
After
is deprecated and will be removed in TYPO3 v15. Existing listeners will keep
working in v14. There is no direct replacement so listeners that decorated
backend layout columns with this event should be removed.
The PSR-14 event
\TYPO3\
allows extension authors to display content in any colPos after the last
content element.
See also
Example
EXT:my_extension/Classes/Backend/EventListener/MyEventListener.php
<?php
declare(strict_types=1);
namespace MyVendor\MyExtension\Backend\EventListener;
use TYPO3\CMS\Backend\View\Event\AfterSectionMarkupGeneratedEvent;
use TYPO3\CMS\Core\Attribute\AsEventListener;
#[AsEventListener(
identifier: 'my-extension/after-section-markup-generated',
)]
final readonly class MyEventListener
{
public function __invoke(AfterSectionMarkupGeneratedEvent $event): void
{
// Check for relevant backend layout
if ($event->getPageLayoutContext()->getBackendLayout()->getIdentifier() !== 'someBackendLayout') {
return;
}
// Check for relevant column
if ($event->getColumnConfig()['identifier'] !== 'someColumn') {
return;
}
$event->setContent('
<div class="t3-page-ce">
<div class="t3-page-ce-element">
<div class="t3-page-ce-header">
<div class="t3-page-ce-header-title">
Some content at the end of the column
</div>
</div>
</div>
</div>
');
}
}
API
- class AfterSectionMarkupGeneratedEvent
-
- Fully qualified name
-
\TYPO3\
CMS\ Backend\ View\ Event\ After Section Markup Generated Event
This event can be triggered to display content in any colpos after the last content element.