Initial import
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user