Backend modules · Question 10 of 12

A custom module should get a button "New entry" in the DocHeader. Which way is intended in TYPO3 v14?

1 answer is correct. Medium

Show answer

Answer

  • A Create the button with ComponentFactory::createLinkButton(), set setHref(), setTitle() and setIcon() and add it with $view->getDocHeaderComponent()->getButtonBar()->addButton()

Explanation

Since TYPO3 v14 buttons are created via the injected ComponentFactory, and the make*Button() methods of the ButtonBar are deprecated and will be removed in v15. The button is still added with addButton(), optionally with position (left, right) and group. Buttons in the DocHeader adapt to the Core design, custom HTML in the content area does not.

Certifications & exams

Which exam comes next?

You can already practise for 19 exams, and 21 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications