model->isTypeOpen() ){ $attributes = [ [ 'attribute' =>'account.name', 'label' => 'Kassza' ], [ 'attribute' =>'typeName', 'label' => 'Típus' ], [ 'attribute' =>'money', 'value' => \Yii::$app->formatter->asInteger($this->model->money) ." Ft", ], 'user.username', [ 'attribute' => 'created_at', 'label' => 'Nyitás ideje' ], ]; }else{ $attributes = [ [ 'attribute' =>'account.name', 'label' => 'Kassza' ], [ 'attribute' =>'typeName', 'label' => 'Típus' ], [ 'attribute' =>'money', 'value' => \Yii::$app->formatter->asInteger($this->model->money) ." Ft", ], 'user.username', [ 'attribute' => 'start_date', 'label' => 'Előző nyitás ideje' ], [ 'attribute' => 'created_at', 'label' => 'Zárás ideje' ], ]; } echo DetailView::widget([ 'model' => $this->model, 'attributes' =>$attributes, ]) ; } }