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.