小编Arn*_*e L的帖子

TYPO3 Extbase - 依赖注入是否在服务类中工作?

我正在使用auth类型的服务来添加基于API的登录.我尝试通过Extbase添加一个带有FrontendUserRepository的用户@inject.但这不起作用.

我做错了什么,或者是否要尽早使用依赖注入?

PS:我知道我可以通过以下方式使用存储库:

$objectManager = GeneralUtility::makeInstance('TYPO3\CMS\Extbase\Object\ObjectManager');
$this->frontendUserRepository = $objectManager->get('TYPO3\\CMS\\Extbase\\Domain\\Repository\\FrontendUserRepository');
Run Code Online (Sandbox Code Playgroud)

typo3 extbase typo3-7.6.x

1
推荐指数
1
解决办法
1143
查看次数

标签 统计

extbase ×1

typo3 ×1

typo3-7.6.x ×1