【发布时间】:2014-09-27 15:59:25
【问题描述】:
我在 TYPO3 6.2 中创建了一个 extbase 插件。在一个表中,我有一个字段“fuid”,我想在其中存储 fe_users uid,以了解哪个用户可以编辑此记录。
我在 createAction 中设置了“fuid”:
$newLocation->setFuID((int) $GLOBALS['TSFE']->fe_user->user['uid']);
这项工作。在数据库中是正确的 UID。
但在editAction中:
$location->getFuID()
returns null
为什么?
TCA:
fu_i_d' => array(
'exclude' => 1,
'label' => 'LLL:EXT:pitss24/Resources/Private/Language/locallang_db.xlf:tx_pitss24_domain_model_location.fu_i_d',
'config' => array(
'type' => 'select',
'items' => array (
array('',0),
),
'foreign_table' => 'fe_users',
'foreign_class' => '\TYPO3\CMS\Extbase\Domain\Model\FrontendUser',
'minitems' => 0,
'maxitems' => 1,
'size' => 10,
'appearance' => array(
'collapseAll' => 0,
'levelLinksPosition' => 'top',
'showSynchronizationLink' => 1,
'showPossibleLocalizationRecords' => 1,
'showAllLocalizationLink' => 1
),
),
),
在后端/TYPO3 一切正常!
【问题讨论】: