Where can I find more information about that, please?
In entity/attachment i found
but where is the translation to
left join $item.embed_metadata
?
I guess this information should be done here:
For my problem i see four solutions:
1) accept that xf can handle only one field with attachments
2) find a way to tell the finder, when he should use embed = embed_metadata and when he should use embed = embed_metadata2
3) Use the one embed_metadata for two text_fields, then i have to change the function that overwrites my values from the other field and vice versa.
or 4) add a new table for just one more field with attachments
Somehow I prefer 3) but i stuck.
With 2) i have the problem that the finder will not work; maybe I need a new addAttachmentsToContent2 ...
or and that is my question: Where can I manipulate ->with('embed')
PHP:
$attachments = $this->finder('XF:Attachment')
->where([
'content_type' => $contentType,
'content_id' => $ids
])
->order('attach_date')
->with('embed')
->fetch()
->groupBy('content_id');
In entity/attachment i found
PHP:
$structure->withAliases = [
'api' => [],
'embed' => []
];
but where is the translation to
left join $item.embed_metadata
?
I guess this information should be done here:
PHP:
$structure->relations['Images2'] = [
'entity' => 'XF:Attachment',
'type' => self::TO_MANY,
'conditions' => [
['content_type', '=', 'xf_lala_item_image2'],
['content_id', '=', '$item_id']
],
'with' => 'Data',
'order' => 'attach_date'
===> 'embed_field' = 'embed_metadata2' <===
];
For my problem i see four solutions:
1) accept that xf can handle only one field with attachments
2) find a way to tell the finder, when he should use embed = embed_metadata and when he should use embed = embed_metadata2
3) Use the one embed_metadata for two text_fields, then i have to change the function that overwrites my values from the other field and vice versa.
or 4) add a new table for just one more field with attachments
Somehow I prefer 3) but i stuck.
With 2) i have the problem that the finder will not work; maybe I need a new addAttachmentsToContent2 ...
or and that is my question: Where can I manipulate ->with('embed')