The \TYPO3\CMS\Backend\Template\Components\DocHeaderComponent can be used to display a standardized header section in a backend module with buttons, menus etc. It can also be used to hide the header section in case it is not desired to display it.

The module header displayed by the DocHeaderComponent

You can get the DocHeaderComponent with \TYPO3\CMS\Backend\Template\ModuleTemplate::getDocHeaderComponent from your module template.

DocHeaderComponent API

It has the following methods:

class DocHeaderComponent
Fully qualified name

DocHeader component class

setMetaInformation ( array $metaInformation)

Set page information

param $metaInformation

Record array

setMetaInformationForResource ( \TYPO3\CMS\Core\Resource\ResourceInterface $resource)
param $resource

the resource

getMenuRegistry ( )

Get moduleMenuRegistry

getButtonBar ( )

Get ButtonBar

isEnabled ( )

Determines whether this components is enabled.

enable ( )

Sets the enabled property to TRUE.

disable ( )

Sets the enabled property to FALSE (disabled).

docHeaderContent ( )

Returns the abstract content of the docHeader as an array


Example: Build a module header with buttons and a menu

The following example is extracted from the example Extbase extension EXT:blog_example. See the complete source code at t3doc/blog-example (GitHub).

We use the DocHeaderComponent to register buttons and a menu to the module header.

Class T3docs\BlogExample\Controller\BackendController
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Backend\Template\ModuleTemplate;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Type\Bitmask\Permission;

class BackendController extends ActionController
    private function modifyDocHeaderComponent(ModuleTemplate $view): void
        $context = '';
        $menu = $this->buildMenu($view, $context);

        $buttonBar = $view->getDocHeaderComponent()->getButtonBar();


        $permissionClause = $GLOBALS['BE_USER']->getPagePermsClause(Permission::PAGE_SHOW);
        $pageRecord = BackendUtility::readPageAccess(
        if ($pageRecord) {

    protected function initializeModuleTemplate(
        ServerRequestInterface $request,
    ): ModuleTemplate {
        $view = $this->moduleTemplateFactory->create($request);


        return $view;