AfterSectionMarkupGeneratedEvent 

The PSR-14 event \TYPO3\CMS\Backend\View\Event\AfterSectionMarkupGeneratedEvent allows extension authors to display content in any colPos after the last content element.

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>
        ');
  }
}
Copied!

New in version 13.0

The PHP attribute \TYPO3\CMS\Core\Attribute\AsEventListener has been introduced to tag a PHP class as an event listener. Alternatively, or if you need to be compatible with older TYPO3 versions, you can also register an event listener via the Configuration/Services.yaml file. Switch to an older version of this page for an example or have a look at the section Implementing an event listener in your extension.

API 

final class AfterSectionMarkupGeneratedEvent
Fully qualified name
\TYPO3\CMS\Backend\View\Event\AfterSectionMarkupGeneratedEvent

This event can be triggered to display content in any colpos after the last content element.

getColumnConfig()
Returns
array
getPageLayoutContext()
Returns
\TYPO3\CMS\Backend\View\PageLayoutContext
getRecords()
Returns
array
setContent(string $content = '')
param $content

the content, default: ''

getContent()
Returns
string
isPropagationStopped()

Prevent other listeners from being called if rendering is stopped by listener.

Returns
bool
setStopRendering(bool $stopRendering)
param $stopRendering

the stopRendering