[TASK] New SignalSlot after preInit in EditDocumentController 77/27777/2
authorJulian Kleinhans <julian.kleinhans@aijko.de>
Fri, 21 Feb 2014 16:48:55 +0000 (17:48 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 23 Feb 2014 08:58:25 +0000 (09:58 +0100)
Adds a new SignalSlot possibility after the preInit method call.

Resolves: #56195
Releases: 6.2
Change-Id: Ia68734999a0e5fbe6c945d9e28d8571cd6192e75
Reviewed-on: https://review.typo3.org/27777
Reviewed-by: Tomas Norre Mikkelsen
Tested-by: Tomas Norre Mikkelsen
Reviewed-by: Erik Frister
Tested-by: Erik Frister
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/backend/Classes/Controller/EditDocumentController.php

index 15c8354..1927a27 100644 (file)
@@ -359,6 +359,11 @@ class EditDocumentController {
        public $dontStoreDocumentRef;
 
        /**
+        * @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
+        */
+       protected $signalSlotDispatcher;
+
+       /**
         * Constructor
         */
        public function __construct() {
@@ -367,6 +372,18 @@ class EditDocumentController {
        }
 
        /**
+        * Get the SignalSlot dispatcher
+        *
+        * @return \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
+        */
+       protected function getSignalSlotDispatcher() {
+               if (!isset($this->signalSlotDispatcher)) {
+                       $this->signalSlotDispatcher = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher');
+               }
+               return $this->signalSlotDispatcher;
+       }
+
+       /**
         * First initialization.
         *
         * @return void
@@ -422,6 +439,8 @@ class EditDocumentController {
                if ($this->workspace !== NULL) {
                        $this->getBackendUser()->setTemporaryWorkspace($this->workspace);
                }
+
+               $this->getSignalSlotDispatcher()->dispatch(__CLASS__, __FUNCTION__ . 'After', array($this));
        }
 
        /**