[BUGFIX] Give extension key to addPlugin() in registerPlugin() 33/31333/3
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:09:44 +0000 (14:09 +0200)
commit15c5b014812154d9473fac7f6ba640b5472d6f86
treec37f822984e0b34c4c0e9d892b06cbb079cabf0d
parent05959eaf121cde85a002b4cf8d9b039f12655e5c
[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/31333
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Marcin SÄ…gol
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