$statements[] = "SELECT JSON_UNQUOTE(JSON_EXTRACT({
$table}.custom_fields, '$.{
$field}')) as media_id FROM `{
$table}` WHERE JSON_UNQUOTE(JSON_EXTRACT(`{
$table}`.custom_fields, '$.{
$field}')) IN (?)";
} } if (\
count($statements) === 0
) { return;
} foreach ($statements as $statement) { $usedMediaIds =
$this->connection->
fetchFirstColumn( $statement,
[$event->
getUnusedIds()],
[ArrayParameterType::STRING
] );
$event->
markAsUsed($usedMediaIds);
} } /**
* @return list<array{id: string, name: string, entity_name: string}>
*/
private function findCustomFieldsWithEntitySelect(string
$componentType): array
{