本文整理汇总了PHP中kartik\dynagrid\DynaGrid::end方法的典型用法代码示例。如果您正苦于以下问题:PHP DynaGrid::end方法的具体用法?PHP DynaGrid::end怎么用?PHP DynaGrid::end使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kartik\dynagrid\DynaGrid
的用法示例。
在下文中一共展示了DynaGrid::end方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
return $model->getImageUrl() ? $model->getImageUrl() : '';
}, 'filter' => false, 'visible' => isset($value['visible']) ? $value['visible'] : true];
break;
case Content::ATTR_TYPE_DATE:
$columns[] = ['attribute' => $attr, 'format' => ['raw', ['width' => '100']], 'value' => function ($data) use($attr) {
return Yii::$app->formatter->asDateTime($data->{$attr}, Yii::$app->formatter->dateFormat) . ' <small style="color:gray;">' . Yii::$app->formatter->asDateTime($data->{$attr}, Yii::$app->formatter->timeFormat) . '</small>';
}, 'filter' => false, 'visible' => isset($value['visible']) ? $value['visible'] : true];
break;
case Content::ATTR_TYPE_BOOLEAN:
$columns[] = ['attribute' => $attr, 'format' => 'raw', 'value' => function ($data) use($attr) {
return Html::checkbox($attr, $data->{$attr});
}, 'filter' => false, 'visible' => isset($value['visible']) ? $value['visible'] : true];
break;
case Content::ATTR_TYPE_DROPDOWN:
$columns[] = ['attribute' => $attr, 'value' => function ($data) use($attr, $value) {
return isset($value['items'][$data->{$attr}]) ? $value['items'][$data->{$attr}] : '';
}, 'filterType' => GridView::FILTER_SELECT2, 'filter' => $value['items'], 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => '---'], 'visible' => isset($value['visible']) ? $value['visible'] : true];
break;
default:
$columns[] = ['attribute' => $attr, 'visible' => isset($value['visible']) ? $value['visible'] : true];
break;
}
}
}
if (class_exists('\\stepancher\\adminlteTheme\\config\\AnminLteThemeConfig')) {
DynaGrid::begin(\yii\helpers\ArrayHelper::merge(\stepancher\adminlteTheme\config\AnminLteThemeConfig::getDefaultConfigDynagrid(), ['columns' => $columns, 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['after' => Html::a('<i class="icon glyphicon fa fa-reply"></i>   Восстановить', '#', ['data-classname' => $module::className(), 'data-action' => \stepancher\content\controllers\AdminController::ACTION_UNARCHIVE, 'class' => 'btn btn-primary btn-multiple', 'title' => 'Восстановить выбранные записи']) . Html::a('<i class="icon glyphicon fa fa-trash"></i>   Удалить', '#', ['data-classname' => $module::className(), 'data-action' => \stepancher\content\controllers\AdminController::ACTION_DELETE, 'class' => 'btn btn-danger btn-multiple', 'title' => 'Удалить выбранные записи']) . '<div class="pull-right">{pager}</div>'], 'options' => ['id' => 'grid', 'data-url' => '/admin/' . $this->context->module->id . '/group-action']], 'options' => ['id' => 'dynagrid-archive-' . $this->context->module->id]]));
} else {
DynaGrid::begin(['columns' => $columns, 'toggleButtonGrid' => ['label' => '<i class="glyphicon glyphicon-wrench"></i>   Настройки'], 'toggleButtonFilter' => ['label' => '<i class="glyphicon glyphicon-filter"></i>    Фильтры'], 'toggleButtonSort' => ['label' => '<i class="glyphicon glyphicon-sort"></i>    Сортировка'], 'storage' => DynaGrid::TYPE_DB, 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'toolbar' => [['content' => Html::a('<i class="glyphicon glyphicon-repeat"></i> Сбросить', [''], ['data-pjax' => 0, 'class' => 'btn btn-default', 'title' => 'Обновить'])], ['content' => '{dynagridFilter}{dynagridSort}{dynagrid}{toggleData}'], '{export}'], 'export' => ['label' => 'Экспорт'], 'panel' => ['footer' => false, 'after' => Html::a('<i class="icon glyphicon fa fa-reply"></i>   Восстановить', '#', ['data-classname' => $module::className(), 'data-action' => \stepancher\content\controllers\AdminController::ACTION_UNARCHIVE, 'class' => 'btn btn-primary btn-multiple', 'title' => 'Восстановить выбранные записи']) . Html::a('<i class="icon glyphicon fa fa-trash"></i>   Удалить', '#', ['data-classname' => $module::className(), 'data-action' => \stepancher\content\controllers\AdminController::ACTION_DELETE, 'class' => 'btn btn-danger btn-multiple', 'title' => 'Удалить выбранные записи']) . '<div class="pull-right">{pager}</div>'], 'options' => ['id' => 'grid', 'data-url' => '/admin/' . $this->context->module->id . '/group-action']], 'options' => ['id' => 'dynagrid-archive-' . $this->context->module->id]]);
}
DynaGrid::end();