[TASK] Make DependencyInjectionTrait compatible to TYPO3 >= 10
This commit is contained in:
parent
97c3407636
commit
f62695055f
@ -111,6 +111,11 @@ trait DependencyInjectionTrait
|
|||||||
get_class($this)
|
get_class($this)
|
||||||
);
|
);
|
||||||
foreach ($classInfo->getInjectMethods() as $method => $className) {
|
foreach ($classInfo->getInjectMethods() as $method => $className) {
|
||||||
|
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||||
|
$className = $className
|
||||||
|
->getFirstParameter()
|
||||||
|
->getDependency();
|
||||||
|
}
|
||||||
$class = $this->objectManager->get(
|
$class = $this->objectManager->get(
|
||||||
$className
|
$className
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user