Files
register/marko_unpacked/marko/portal/models/parsed/SlidesParsed.php
T
Admin Nasledstvo ac168868ee Initial import
2026-05-01 20:52:04 +03:00

34 lines
731 B
PHP

<?php
namespace app\models\parsed;
use app\models\Slides;
class SlidesParsed
{
public $title;
public $text;
public $relation;
public $image;
public function __construct(Slides $model)
{
switch (\Yii::$app->language) {
default:
$this->title = $model->title;
$this->text = $model->text;
$this->relation = $model->relation;
break;
case 'en':
$this->title = $model->ts_en_title;
$this->text = $model->ts_en_text;
$this->relation = $model->ts_en_relation;
}
$this->image = $model->getSrcOfSingleImage('slide_home_page_image', '16:10');
}
}