[BUGFIX] Give extension key to addPlugin() in registerPlugin() 36/31336/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Sat, 5 Jul 2014 11:44:19 +0000 (13:44 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 5 Jul 2014 12:10:09 +0000 (14:10 +0200)
commit34feddb752f8e63ec6b7713195ee31b00eb4bb0c
treee4bb4a5858a347d0571d72e5d8e17a2b38ea8b51
parentc7dbd9f4f258f12b9b77094c553ea66879f63fb7
[BUGFIX] Give extension key to addPlugin() in registerPlugin()

With patch #59770 ExtensionManagementUtility::addPlugin() signature
was extended to get the extensionKey as parameter in order to not
use $GLOBALS['_EXTKEY'] anymore if possible.
The parameter is used to determine correct path to plugin icons if
the icon path is not given otherwise.
The patch changes extbase ExtensionUtility::registerPlugin() to give
the extensionKey to addPlugin, too.
With this patch registerPlugin() can be used in TCA/Overrides.
Some tests are added to verify the icon path calculation since it is
not trivial to follow the code flow with all its options and global
array access.

Change-Id: I2dd709ef7ca304bc8c4fda1e7911f18bfe7ad04c
Resolves: #60109
Related: #59770
Related: #59468
Related: #59414
Releases: 6.3, 6.2
Reviewed-on: https://review.typo3.org/31336
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
typo3/sysext/extbase/Classes/Utility/ExtensionUtility.php
typo3/sysext/extbase/Tests/Unit/Utility/ExtensionUtilityTest.php