是否可以在自己的插件记录中搜索 'group' 类型的记录?

Is there a possibility to search for type 'group' records in own plugin records?

我不确定如何描述它....我正在尝试使用后端搜索在我自己的记录上搜索某些值,例如名字、姓氏等,但地址不同 table fe_users关系存在并且也是正确的

示例:

当我搜索用户名时,first_name 或 last_name 我收到 0 个结果:

那是我的 TCA:

return [
'ctrl' => [
    'title' => 'My custom Plugin',
    'label' => 'user',
    'tstamp' => 'tstamp',
    'crdate' => 'crdate',
    'cruser_id' => 'cruser_id',
    'versioningWS' => false,
    'languageField' => 'sys_language_uid',
    'transOrigPointerField' => 'l10n_parent',
    'transOrigDiffSourceField' => 'l10n_diffsource',
    'delete' => 'deleted',
    'enablecolumns' => [
        'disabled' => 'hidden',
        'starttime' => 'starttime',
        'endtime' => 'endtime',
    ],
    'searchFields' => 'user, customId',
    'iconfile' => '' // todo
],
'interface' => [
    'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, user, customId',
],
'types' => [
    '1' => [
        'showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, user, customId'
    ],
],
'columns' => [
    'user' => [
        'label' => 'FE-User',
        'config' => [
            'type' => 'select',
            'renderType' => 'selectSingle',
            'foreign_table' => 'fe_users',
            'readOnly' => true
        ],
    ],
    'customId' => [
        'label' => 'My custom plugin',
        'config' => [
            'type' => 'group',
            'internal_type' => 'db',
            'allowed' => 'tt_content',
            'readOnly' => true,
            'size' => 1
        ]
    ]
  ],
];

实现起来容易吗?我可能缺少配置吗?

搜索不解析关系,只考虑 searchFields。因此,您可以使用 DataHandler 的钩子并将相关用户的某些字段的值添加到 table 的只读字段并使其可搜索。