Issue Bug Closed

#76415Wrong phpDoc usage example for ShortcutButton

Georg Tiefenbrunn 06/01/16, 10:20 updated 10/02/18, 11:10

Description

phpDoc for class TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton is wrong.

  31  * EXAMPLE USAGE TO ADD A SHORTCUT BUTTON:
  32  *
  33  * $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
  34  * $myButton = $buttonBar->makeShortcutButton()
  35  *       ->setModuleName('my_info');
  36  * $extbaseButton = $buttonBar->makeShortcutButton()
  37  *      ->setControllerContext($this->controllerContext);

Method setControllerContext() is not defined in the class (and the implemented interfaces ButtonInterface and PositionInterface).

see https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/typo3/sysext/backend/Classes/Template/Components/Buttons/Action/ShortcutButton.php#l36

Reviews 2