---
title: "Deprecation: #72859 - Deprecate methods of DocumentTemplate"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:deprecation-72859"
source: "Changelog/8.2/Deprecation-72859-DeprecateMethodsOfDocumentTemplate.rst"
typo3-version: "8.2"
typo3-major: 8
type: "deprecation"
issue: 72859
forge: "https://forge.typo3.org/issues/72859"
tags: ["Backend", "PHP-API"]
rendered: "2026-09-17T21:17:42+00:00"
---

# Deprecation: #72859 - Deprecate methods of DocumentTemplate {#deprecation-72859-deprecate-methods-of-documenttemplate}

See [forge#72859](https://forge.typo3.org/issues/72859)

## Description {#description}

The following methods within `DocumentTemplate` have been marked as deprecated:

-   viewPageIcon()
-   getHeader()
-   getResourceHeader()
-   header()
-   icons()
-   t3Button()
-   wrapScriptTags()
-   loadJavascriptLib()
-   getContextMenuCode()

The following property within `DocumentTemplate` has been marked as deprecated:

-   sectionFlag (is internal)

## Impact {#impact}

Calling any of the methods above will trigger a deprecation log entry.

## Affected Installations {#affected-installations}

Any installation with a 3rd party extension calling one of the methods in its PHP code.

## Migration {#migration}

Instead of `wrapScriptTags()` use `GeneralUtility::wrapJS`.

Instead of `getContextMenuCode()` use:

```php
$this->getPageRenderer()->loadJquery();
$this->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/ClickMenu');
```
