У меня есть форма. На последнем шаге формы я отображаю в таблице то, что было сохранено в полях на предыдущих шагах.
Там, где в коде есть комментарий, мне нужно отрендерить все изображение из $taxonomy_pms_color
<?php
$quote_printing_pms_colors = $quote_print_location->get('field_pms_colors')->getValue();
$pms_colors = '';
foreach (
$quote_printing_pms_colors as $pms_color_value) {
$taxonomy_pms_color_target_id = $pms_color_value['target_id'];
$taxonomy_pms_color = $this->entityTypeManager->getStorage('taxonomy_term')->load($taxonomy_pms_color_target_id);
$image_uri = $taxonomy_pms_color->get('field_image')->entity->getFileUri();
}
$print_locations_rows[] = [
'pms_colors' => [
'data' => [
// Здесь должно быть отрендеренное все изображения
],
],
];
}
if (!empty(
$print_locations_rows)) {
$print_locations_header = [
'col1' => $this->t('PMS Colors'),
];
$form['confirm_quote']['designs_and_finishing_wrapper']['design_wrapper'][$key]['print_location_table'] = [
'#type' => 'table',
'#header' => $print_locations_header,
'#rows' => $print_locations_rows,
'#attributes' => [
'class' => ['my-class'],
],
];
?>