[BUGFIX] Fix notice in EditFileController 14/56214/6
authorMathias Brodala <mbrodala@pagemachine.de>
Fri, 16 Mar 2018 11:22:22 +0000 (12:22 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 16 Mar 2018 12:35:23 +0000 (13:35 +0100)
Change-Id: I3b7d0742237219f014fee7f9455a2c518c3e36d9
Resolves: #84295
Releases: master
Reviewed-on: https://review.typo3.org/56214
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Controller/File/EditFileController.php

index 343458c..95135dd 100644 (file)
@@ -214,7 +214,7 @@ class EditFileController
             'defaultExtras' => 'fixed-font: enable-tab'
         ];
 
-        $this->getButtons();
+        $this->getButtonsInternal();
         // Hook: before compiling the output
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/file_edit.php']['preOutputProcessingHook'] ?? [] as $hookFunction) {
             $hookParameters = [
@@ -331,10 +331,17 @@ class EditFileController
      *
      * @deprecated since TYPO3 v9, will be set protected in TYPO3 v10
      */
-    public function getButtons(): void
+    public function getButtons()
     {
-        trigger_error('Method getButtons() will be set to protected in v10. Do not call from other extension', E_USER_DEPRECATED);
+        trigger_error('Method getButtons() will be replaced by protected method getButtonsInternal() in v10. Do not call from other extension', E_USER_DEPRECATED);
+        $this->getButtonsInternal();
+    }
 
+    /**
+     * Builds the buttons for the docheader
+     */
+    protected function getButtonsInternal(): void
+    {
         $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
 
         $lang = $this->getLanguageService();