findOne($model->id); if( !$filter ){ $filter = new stdClass(); $filter->brightness = 100; $filter->saturate = 100; $filter->contrast = 100; $filter->opacity = 0.5; } $sstr = 'style="filter: saturate('.$filter->saturate.'%) brightness('.$filter->brightness.'%) contrast('.$filter->contrast.'%);"'; ?> } $preview = $model->preview; switch ($index){ case 0: $className = "main"; break; case 1: $className = "high"; break; default: $className = "low"; } if($index==2) echo \yii\helpers\Html::beginTag("div",["class"=>'group']); ?>