【发布时间】:2015-02-22 10:30:16
【问题描述】:
如何获得所有前端用户组的列表?
我试过了:
/**
* feUserGroupRepository
*
* @var \TYPO3\CMS\Extbase\Domain\Repository\FrontendUserGroupRepository
* @inject
*/
protected $feUserGroupRepository = NULL;`
然后是这个:
$usergroups = $this->feUserGroupRepository->findAll();
我收到此错误:在非对象上调用成员函数 findAll()
我试过这样:
/**
* @var \TYPO3\CMS\Extbase\Domain\Repository\FrontendUserGroupRepository $feUserGroupRepository
*/
$feUserGroupRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Domain\\Repository\\FrontendUserGroupRepository');
$allUsers = $feUserGroupRepository->findAll();`
根本不工作我收到此错误消息
PHP 可捕获的致命错误:参数 1 传递给
TYPO3\CMS\Extbase\Persistence\Repository::__construct() must implement interface
TYPO3\CMS\Extbase\Object\ObjectManagerInterface, none given, called in
C:\xampp\htdocs\typo3\typo3\sysext\core\Classes\Utility\GeneralUtility.php on
line 4431 and
defined in C:\xampp\htdocs\typo3\typo3\sysext\extbase\Classes\Persistence\Repository.php
如何获得包含所有 feusergroup 的列表?
Rcord 类型?
【问题讨论】:
-
请先改进您的格式。