我在extbase extension creation
期间在我的项目中遇到以下 TYPO3 错误
Cannot create empty instance of the class
"TYPO3'CMS'Extbase'Persistence'ObjectStorage" because it does not implement
the TYPO3'CMS'Extbase'DomainObject'DomainObjectInterface.
我认为这与从另一个扩展rezepte
加载对象有关。
'rezepte' => array(
'exclude' => 0,
'label' => 'LLL:EXT:nebenwirkungen/Resources/Private/Language/locallang_db.xlf:tx_nebenwirkungen_domain_model_nebenwirkung.rezepte',
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_rezepte_domain_model_rezept',
'foreign_table_where' => 'AND tx_rezepte_domain_model_rezept.sys_language_uid=###REC_FIELD_sys_language_uid### ORDER BY tx_rezepte_domain_model_rezept.rezeptname',
'MM' => 'tx_nebenwirkungen_nebenwirkung__mm',
'size' => 10,
'autoSizeMax' => 30,
'maxitems' => 9999,
'multiple' => 0,
'wizards' => array(
'_PADDING' => 1,
'_VERTICAL' => 1,
),
),
),
任何想法可能出了什么问题?
我发现了问题所在:
我忘了在模型文件中设置对象存储的类型:
'TYPO3'CMS'Extbase'Persistence'ObjectStorage<>
必须是:
'TYPO3'CMS'Extbase'Persistence'ObjectStorage<'EmP'Rezepte'Domain'Model'Rezept>