2017-07-28 60 views
0

我有TYPO3 18年7月6日TYPO3 TCA國外where字段= UID

'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
'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',