我尝试使用新的Field,customernumber扩展Extension femanager。我为此字段设置了TCA定义和模型。在Typoscript中,我设置了我的模型并将其映射到fe_users
。
config.tx_extbase{
persistence{
classes{
In2\Femanager\Domain\Model\User {
subclasses {
0 = FederhenSchneider\Extendfemanager\Domain\Model\User
}
}
FederhenSchneider\Extendfemanager\Domain\Model\User {
mapping {
tableName = fe_users
recordType = 0
}
}
}
}
objects {
In2\Femanager\Controller\NewController.className = FederhenSchneider\Extendfemanager\Controller\NewController
In2\Femanager\Controller\EditController.className = FederhenSchneider\Extendfemanager\Controller\EditController
In2\Femanager\Domain\Validator\ServersideValidator.className = FederhenSchneider\Extendfemanager\Domain\Validator\CustomServersideValidator
In2\Femanager\Domain\Validator\ClientsideValidator.className = FederhenSchneider\Extendfemanager\Domain\Validator\CustomClientsideValidator
}
}
plugin.tx_femanager {
view {
partialRootPaths {
10 = EXT:extendfemanager/Resources/Private/Partials/
}
}
}
在后端,现场可以。当我在前端发送我的公式时,我得到了这个错误:
属性路径“”的属性映射异常:“属性” 在类型的目标对象中找不到“customernumber” “In2code \ Femanager \域\模型\用户”。
我不明白他为什么从In2Code而不是我的模型中查看模型。
我的系统: PHP 7.0 TYPO3 7.6.18 Femanager 2.6.0
答案 0 :(得分:0)
Femanager 2.6.0使用In2code\Femanager\Domain\Model\User
(In2code而不是In2)作为命名空间。
更正了Typoscript:
config.tx_extbase{
persistence{
classes{
In2code\Femanager\Domain\Model\User {
subclasses {
0 = FederhenSchneider\Extendfemanager\Domain\Model\User
}
}
FederhenSchneider\Extendfemanager\Domain\Model\User {
mapping {
tableName = fe_users
recordType = 0
}
}
}
}
objects {
In2code\Femanager\Controller\NewController.className = FederhenSchneider\Extendfemanager\Controller\NewController
In2code\Femanager\Controller\EditController.className = FederhenSchneider\Extendfemanager\Controller\EditController
In2code\Femanager\Domain\Validator\ServersideValidator.className = FederhenSchneider\Extendfemanager\Domain\Validator\CustomServersideValidator
In2code\Femanager\Domain\Validator\ClientsideValidator.className = FederhenSchneider\Extendfemanager\Domain\Validator\CustomClientsideValidator
}
}
plugin.tx_femanager {
view {
partialRootPaths {
10 = EXT:extendfemanager/Resources/Private/Partials/
}
}
}