<?php use yii\helpers\Html; use yii\widgets\DetailView; use app\module\handbook\models\ClassType; use app\module\handbook\models\Specclasses; /* @var $this yii\web\View */ /* @var $model app\module\handbook\models\ClassRooms */ $this->title = 'Аудиторія №' . $model->classrooms_number; $this->params['breadcrumbs'][] = ['label' => 'Аудиторії', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; $optionsId = ClassType::findAll(['classroom_id' => $model->classrooms_id]); for ($i = 0; $i < count($optionsId); $i++) { $optionName[] = Specclasses::findAll(['spec_class_id' => $optionsId[$i]['spec_class_id']]); $optionsArray[] = $optionName[$i][0]['spec_class_name'] . " "; } $optionsString = implode($optionsArray); function translater($val) { if ($val == 0) { return "Ні"; } else { return "Так"; } } ?> <div class="classrooms-view"> <h1><?php echo Html::encode($this->title); ?>