[TASK] New SignalSlot after preInit in EditDocumentController
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Controller / EditDocumentController.php
index 15c8354..1927a27 100644 (file)
@@ -358,6 +358,11 @@ class EditDocumentController {
         */
        public $dontStoreDocumentRef;
 
+       /**
+        * @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
+        */
+       protected $signalSlotDispatcher;
+
        /**
         * Constructor
         */
@@ -366,6 +371,18 @@ class EditDocumentController {
                $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_alt_doc.xml');
        }
 
+       /**
+        * 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.
         *
@@ -422,6 +439,8 @@ class EditDocumentController {
                if ($this->workspace !== NULL) {
                        $this->getBackendUser()->setTemporaryWorkspace($this->workspace);
                }
+
+               $this->getSignalSlotDispatcher()->dispatch(__CLASS__, __FUNCTION__ . 'After', array($this));
        }
 
        /**