Issue Bug Closed

#108429Typo in example code DropDownButton.php

Marcus Raphelt 12/08/25, 23:36 updated 03/31/26, 09:01

Description

In cms-backend/Classes/Template/Components/Buttons/DropDownButton.php, there’s a typo in the example code around line 42

/* $dropDownButton = $buttonBar->makeDropDownButton()
 *      ->setLabel('Dropdown')
 *      ->setTitle('Save')
 *      ->setIcon($this->iconFactory->getIcon('actions-heart'))
 *      ->getShowLabelText(true)
 *      ->addItem(
 *          GeneralUtility::makeInstance(DropDownItem::class)
 *              ->setLabel('Item')
 *              ->setHref('#')
 *      );
*/

It should be setShowLabelText instead of getShowLabelText.

Reviews 1