TYPO3 TCA foreign where field = uid

时间:2017-07-28 12:47:28

标签: typo3

我有TYPO3 7.6.18

'friends' => array(
    'label' => 'LLL:EXT:feusersplus/Resources/Private/Language/locallang_db.xlf:friends',
    'config' => array(
        'type' => 'inline',
        'foreign_table' => 'tx_feuserfriends_domain_model_friend',
        'foreign_match_fields' => [
            'user_from' => '###THIS_UID### '
        ],
        'foreign_table_where' => 'tx_feuserfriends_domain_model_friend.sys_language_uid=###REC_FIELD_sys_language_uid### ',
        'maxitems' => '5000'
    ),
),

我扩展了fe_users。所有的工作,这个配置确实有效。我需要获取foreign_table.user_from = current_uid或foreign_table.user_to所在的所有项目。可能吗 ?

1 个答案:

答案 0 :(得分:1)

'friends' => array(
    'label' => 'LLL:EXT:feusersplus/Resources/Private/Language/locallang_db.xlf:friends',
    'config' => array(
        'type' => 'inline',
        'foreign_table' => 'tx_feuserfriends_domain_model_friend',
        'foreign_field' => 'user_from',
        'symmetric_field' => 'user_to',

        'maxitems' => '5000'
    ),
),

解决方案' symmetric_field' => ' user_to',