title = cut_title($model->answer_body); $this->params['breadcrumbs'][] = ['label' => 'Answers', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; \yii\web\YiiAsset::register($this); function cut_title($str) { if(strlen($str) > 35){ return mb_substr($str, 0, 35, 'UTF-8') . '...'; } return $str; } ?>

'btn btn-primary']) ?> $model->id], ['class' => 'btn btn-primary']) ?> $model->id], [ 'class' => 'btn btn-danger', 'data' => [ 'confirm' => 'Are you sure you want to delete this item?', 'method' => 'post', ], ]) ?>

$model, 'attributes' => [ 'id', [ 'attribute' => 'question_id', 'value' => function($model){ return $model->getQuestionBody(); } ], [ 'attribute' => 'answer_flag', 'format' => 'raw', 'filter' => \common\helpers\AnswerHelper::answerFlagsList(), 'value' => function ($model) { return \common\helpers\AnswerHelper::answerStatusLabel($model->status); }, ], [ 'attribute' => 'status', 'format' => 'raw', 'filter' => \common\helpers\StatusHelper::statusList(), 'value' => function($model){ return \common\helpers\StatusHelper::statusLabel($model->status); } ], 'created_at', 'updated_at', ], ]) ?>