Issue Bug Closed

#109404Hook ['SC_OPTIONS']['typo3/show_item.php']['typeRendering'] is not "usable"

Xavier Perseguers 03/27/26, 13:49 updated 04/21/26, 11:30

Description

Since I’m about to implement it a second time, I think it’s wise to make it clear the hook is actually not “usable” since all class fields have been marked as protected/private, long ago.

  • Hook: [‘SC_OPTIONS’][‘typo3/show_item.php’][‘typeRendering’]
  • Hook is located in: \TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController

Problems with passed reference to $pObj

  • Protected field $table => must be either public or (better) accessible with a getter
  • Protected field $row => must be either public or (better) accessible with a getter
  • Protected method getPageTitle => should be public, same for all other similar methods used by the Core to prepare the page as the hook take over but should not have to reinvent the wheel, it should be possible to extend

In addition, I would suggest to pass the view $view to the hook, otherwise:

1. The page title cannot be set
2. Other variables cannot be assigned (not in use but certainly useful for a hook, generally-speaking).

Reviews 2