0
TYPO3 7.6.15中的FlexForm UserFunc中的findAll得到空結果。 storagePid已設置,在前端我用findAll獲得所有結果。TYPO3中的FlexForm UserFunc中findAll的空結果7.6.15
這裏是我的UserFunc法:
public function getBuldingOptions(&$config)
{
/** @var ObjectManager $om */
$om = GeneralUtility::makeInstance(ObjectManager::class);
/** @var BuildingRepository $repo */
$repo = $om->get(BuildingRepository::class);
$building = $repo->findAll();
DebuggerUtility::var_dump($building, '$building'); // Output: TYPO3\CMS\Extbase\Persistence\Generic\QueryResultprototypeobject (empty)
// add empty value option
$config['items'][] = [LocalizationUtility::translate('BuildingUserFunc.building.emtpyValue', $this->extName), 0];
/** @var Building $entity */
foreach ($building as $entity) {
$config['items'][] = [$entity->getName(), $entity->getUid()];
}
return $config;
}
能有什麼用還是錯?任何人有個想法?