generateUrlParams(); $nameAttribute = $generator->getNameAttribute(); echo " use yii\helpers\Html; use = $generator->indexWidgetType === 'grid' ? "yii\\grid\\GridView" : "yii\\widgets\\ListView" ?>; /** * @var yii\web\View $this * @var yii\data\ActiveDataProvider $dataProvider * @var = ltrim($generator->searchModelClass, '\\') ?> $searchModel */ $this->title = '= Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass))) ?>'; $this->params['breadcrumbs'][] = $this->title; ?>
= "= " ?>Html::a('Create = StringHelper::basename($generator->modelClass) ?>', ['create'], ['class' => 'btn btn-success']) ?>
indexWidgetType === 'grid'): ?> = "echo GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], getTableSchema()) === false) { foreach ($generator->getColumnNames() as $name) { if (++$count < 6) { echo "\t\t\t'" . $name . "',\n"; } else { echo "\t\t\t// '" . $name . "',\n"; } } } else { foreach ($tableSchema->columns as $column) { $format = $generator->generateColumnFormat($column); if (++$count < 6) { echo "\t\t\t'" . $column->name . ($format === 'text' ? "" : ":" . $format) . "',\n"; } else { echo "\t\t\t// '" . $column->name . ($format === 'text' ? "" : ":" . $format) . "',\n"; } } } ?> ['class' => 'yii\grid\ActionColumn'], ], ]); ?> = "echo ListView::widget([ 'dataProvider' => $dataProvider, 'itemOptions' => ['class' => 'item'], 'itemView' => function ($model, $key, $index, $widget) { return Html::a(Html::encode($model->= $nameAttribute ?>), ['view', = $urlParams ?>]); }, ]); ?>