return $this->
get('models'
)->
getRepository(Detail::
class);
} /**
* @param array{data: array<array<string, mixed>>, total: int} $result
*
* @return array{data: array<array<string, mixed>>, total: int}
*/
private function addAdditionalText(array
$result): array
{ $products =
$this->
buildListProducts($result['data'
]);
$products =
$this->
getAdditionalTexts($products);
foreach ($result['data'
] as &
$item) { $number =
$item['Detail_number'
];
$item['Detail_additionalText_dynamic'
] = null;
if (!
isset($products[$number])) { continue;
} $item['Detail_additionalText_dynamic'
] =
$products[$number]->
getAdditional();
}