direction = $direction; } public function getHTML() { $direction = $this->direction; $fon_3 = URL::to('img/front-page/bakalavr-special/fon3_blok.png'); $education_form = ''; foreach ($direction['education_form'] as $el) { $education_form .= $el . ', '; } $education_form = substr($education_form, 0, -2); $period = '
'; foreach ($direction['period'] as $key => $el) { $period .= '' . $key . ' - ' . '' . $el . '
' ; } $EGE = '
'; foreach ($direction['entrance_examinations']['ЕГЭ']['Обязательные'] as $key => $el) { $EGE .= '' . $key . ' - ' . '' . $el . '
' ; } //dd($direction); $po_viboru = '
'; if(array_key_exists('Предметы по выбору', $direction['entrance_examinations']['ЕГЭ'])){ foreach ($direction['entrance_examinations']['ЕГЭ']['Предметы по выбору'] as $key => $el) { $po_viboru .= '' . $key . ' - ' . '' . $el . '
' ; } } $SPO = '
'; if(array_key_exists('СПО', $direction['entrance_examinations'])){ foreach ($direction['entrance_examinations']['СПО']['Обязательные'] as $key => $el) { $SPO .= '' . $key . ' - ' . '' . $el . '
' ; } } $mgtu = ''; if(array_key_exists('МГТУ', $direction['budget_places'])){ foreach ($direction['budget_places']['МГТУ'] as $profile_name => $profile) { $profile_content =''; foreach($profile as $forms => $budget_places){ $profile_content .= " {$forms} - " . " {$budget_places}
"; } $mgtu .= "

$profile_content
" ; } } $filial = '222'; return "
{$direction['code']}
{$direction['name']}

{$direction['description']}

Уровень образования: {$direction['education_level']}
Форма обучения: {$education_form}
Период обучения (в годах): $period
Места для обучения:
Проходные баллы:
ЕГЭ $EGE
Предметы по выбору $po_viboru
СПО $SPO
"; } // phpcs:enable }