[FEATURE] Add signal after extension installation 10/38010/3
authorNicole Cordes <typo3@cordes.co>
Sun, 22 Mar 2015 21:06:13 +0000 (22:06 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 23 Mar 2015 01:34:51 +0000 (02:34 +0100)
The patch adds a signal after an extension was successfully installed
and all imports and updates are done.

Resolves: #61306
Releases: master
Change-Id: Ifaaf353e44299a830f33d9fe6b818d45e8774fb1
Reviewed-on: http://review.typo3.org/38010
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php
typo3/sysext/extensionmanager/Tests/Unit/Utility/InstallUtilityTest.php

index 202742c..65dcd69 100644 (file)
@@ -113,6 +113,8 @@ class InstallUtility implements \TYPO3\CMS\Core\SingletonInterface {
                } else {
                        $this->cacheManager->flushCachesInGroup('system');
                }
+
+               $this->emitAfterExtensionInstallSignal($extensionKey);
        }
 
        /**
@@ -171,6 +173,15 @@ class InstallUtility implements \TYPO3\CMS\Core\SingletonInterface {
        }
 
        /**
+        * Emits a signal after an extension has been installed
+        *
+        * @param string $extensionKey
+        */
+       protected function emitAfterExtensionInstallSignal($extensionKey) {
+               $this->signalSlotDispatcher->dispatch(__CLASS__, 'afterExtensionInstall', array($extensionKey, $this));
+       }
+
+       /**
         * Emits a signal after an extension has been uninstalled
         *
         * @param string $extensionKey
index a2e4c77..b65b06d 100644 (file)
@@ -60,7 +60,8 @@ class InstallUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'saveDefaultConfiguration',
                                'enrichExtensionWithDetails',
                                'ensureConfiguredDirectoriesExist',
-                               'importInitialFiles'
+                               'importInitialFiles',
+                               'emitAfterExtensionInstallSignal'
                        ),
                        array(),
                        '',