2024-03-12 12:47:12 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Services;
|
|
|
|
|
|
|
|
use App\Models\Direction;
|
|
|
|
|
|
|
|
class DirectonHtmlBuilder
|
|
|
|
{
|
|
|
|
private Direction $direction;
|
|
|
|
public function __construct($direction)
|
|
|
|
{
|
|
|
|
$this->direction = $direction;
|
|
|
|
}
|
|
|
|
public function getHTML()
|
|
|
|
{
|
2024-03-12 13:09:48 +03:00
|
|
|
// phpcs:disable
|
|
|
|
|
2024-03-12 12:47:12 +03:00
|
|
|
$direction = $this->direction;
|
|
|
|
return "<div class=\"offcanvas offcanvas-bottom\" data-bs-scroll=\"true\" data-bs-backdrop=\"false\" tabindex=\"-1\" id=\"offcanvasScrolling-{$direction->id }\" aria-labelledby=\"offcanvasScrollingLabel-{$direction->id}\" style=\"height: 100%; font-family: Geologica-Medium;overflow-y: auto ;\">
|
|
|
|
<div class=\"mx-5\">
|
|
|
|
<div class=\"col-12 d-flex justify-content-end mt-4\">
|
|
|
|
<button type=\"button\" class=\"btn-close text-reset\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\"></button>
|
|
|
|
</div>
|
|
|
|
<div class=\"row\">
|
|
|
|
<div class=\"col-xl-3 col-12\">
|
|
|
|
<div class=\"display-5 \" style=\"font-family: Geologica-Light\"> {$direction->code} </div>
|
|
|
|
<div class=\"display-5 \" > {$direction->name}</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class=\"row\">
|
|
|
|
|
|
|
|
<div class=\"col-xl-3 col-12\">
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
<div> Уровень образования: <span style=\"font-family: Geologica-Light\">{$direction->educationLevel->name} </span> </div>
|
|
|
|
<div> Форма обучения: <span style=\"font-family: Geologica-Light\">{$direction->educationForm->name} </span></div>
|
|
|
|
</div>
|
|
|
|
<div class=\"col-xl-3 col-12\">
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
<div> Бюджетные места: <span style=\"font-family: Geologica-Light\">{$direction->budget_places} </span> </div>
|
|
|
|
<div> Квота: <span style=\"font-family: Geologica-Light\">{$direction->quota} </span></div>
|
|
|
|
</div>
|
|
|
|
<div class=\"col-xl-3 col-12\">
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
<div> Места на контракт: <span style=\"font-family: Geologica-Light\">{$direction->paid_places} </span> </div>
|
|
|
|
<div> Стоимость платного обучения: <span style=\"font-family: Geologica-Light\">{$direction->cost_paid_place} </span></div>
|
|
|
|
</div>
|
|
|
|
<div class=\"col-xl-3 col-12\">
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
<div> Период обучения (в годах): <span style=\"font-family: Geologica-Light\">{$direction->period} </span> </div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class=\"offcanvas-body mt-2\" style=\"font-family: Geologica-ExtraLight\">
|
|
|
|
<p style=\"text-align: justify;\">{$direction->description}</p>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div> ";
|
|
|
|
}
|
2024-03-12 13:09:48 +03:00
|
|
|
// phpcs:enable
|
2024-03-12 12:47:12 +03:00
|
|
|
}
|