/** * @inheritdoc */ public function actions() { return ArrayHelper::merge(parent::actions(), ['index' => ["dataProviderCallback" => function (ActiveDataProvider $activeDataProvider) { $activeDataProvider->query->andWhere(['type' => ShopDiscount::TYPE_DEFAULT]); }, "gridConfig" => ['settingsData' => ['order' => SORT_ASC, 'orderBy' => "priority"]], "columns" => ['id', ['attribute' => 'name'], ['attribute' => 'value', 'class' => DataColumn::className(), 'value' => function (ShopDiscount $shopDiscount) { if ($shopDiscount->value_type == ShopDiscount::VALUE_TYPE_P) { return \Yii::$app->formatter->asPercent($shopDiscount->value / 100); } else { $money = Money::fromString((string) $shopDiscount->value, $shopDiscount->currency_code); return \Yii::$app->money->intlFormatter()->format($money); } }], ['attribute' => 'active', 'class' => BooleanColumn::className()], ['attribute' => 'active_from', 'class' => DateTimeColumnData::className()], ['attribute' => 'active_to', 'class' => DateTimeColumnData::className()], ['class' => UpdatedByColumn::className()], ['class' => UpdatedAtColumn::className()], 'priority']]]); }
/** * @inheritdoc */ public function actions() { return ArrayHelper::merge(parent::actions(), ['index' => ["dataProviderCallback" => function (ActiveDataProvider $dataProvider) { $query = $dataProvider->query; /** * @var \yii\db\ActiveQuery $query */ //$query->select(['app_company.*', 'count(`app_company_officer_user`.`id`) as countOfficer']); $query->groupBy([CmsUser::tableName() . '.id']); $query->innerJoin(ShopBuyer::tableName(), '`shop_buyer`.`cms_user_id` = `cms_user`.`id`'); }, "columns" => [['class' => UserColumnData::className(), 'attribute' => 'id', 'label' => \skeeks\cms\shop\Module::t('app', 'Buyer')], 'email', 'phone', ['class' => DateTimeColumnData::className(), 'attribute' => 'created_at', 'label' => \skeeks\cms\shop\Module::t('app', 'Date of registration')], ['class' => DataColumn::className(), 'label' => \skeeks\cms\shop\Module::t('app', 'Date of last order'), 'value' => function (CmsUser $model) { if ($order = ShopOrder::find()->where(['user_id' => $model->id])->orderBy(['created_at' => SORT_DESC])->one()) { return \Yii::$app->formatter->asDatetime($order->created_at); } return null; }], ['class' => DataColumn::className(), 'label' => \skeeks\cms\shop\Module::t('app', 'The amount paid orders'), 'value' => function (CmsUser $model) { return ShopOrder::find()->where(['user_id' => $model->id, 'payed' => Cms::BOOL_Y])->count(); }]]]]); }
* @date 02.06.2015 */ /* @var $this yii\web\View */ /* @var $searchModel \skeeks\cms\models\Search */ /* @var $dataProvider yii\data\ActiveDataProvider */ $query = $dataProvider->query; $query->groupBy([\skeeks\cms\models\CmsUser::tableName() . '.id']); $query->leftJoin(\skeeks\cms\shop\models\ShopOrder::tableName(), '`shop_order`.`user_id` = `cms_user`.`id`'); ?> <? $pjax = \skeeks\cms\modules\admin\widgets\Pjax::begin(); ?> <?php echo $this->render('_search', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); ?> <?php echo \skeeks\cms\modules\admin\widgets\GridViewStandart::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'pjax' => $pjax, 'adminController' => \Yii::$app->controller, 'columns' => [['class' => \skeeks\cms\grid\UserColumnData::className(), 'attribute' => 'id', 'label' => \Yii::t('skeeks/shop/app', 'Buyer')], 'email', 'phone', ['class' => \skeeks\cms\grid\DateTimeColumnData::className(), 'attribute' => 'created_at', 'label' => \Yii::t('skeeks/shop/app', 'Date of registration')], ['class' => \yii\grid\DataColumn::className(), 'label' => \Yii::t('skeeks/shop/app', 'Date of last order'), 'value' => function (\skeeks\cms\models\CmsUser $model) { if ($order = \skeeks\cms\shop\models\ShopOrder::find()->where(['user_id' => $model->id])->orderBy(['created_at' => SORT_DESC])->one()) { return \Yii::$app->formatter->asDatetime($order->created_at); } return null; }], ['class' => \yii\grid\DataColumn::className(), 'label' => \Yii::t('skeeks/shop/app', 'The amount paid orders'), 'value' => function (\skeeks\cms\models\CmsUser $model) { return \skeeks\cms\shop\models\ShopOrder::find()->where(['user_id' => $model->id, 'payed' => \skeeks\cms\components\Cms::BOOL_Y])->count(); }], ['class' => \yii\grid\DataColumn::className(), 'label' => \Yii::t('skeeks/shop/app', 'The amount paid orders'), 'value' => function (\skeeks\cms\models\CmsUser $model) { return \skeeks\cms\shop\models\ShopOrder::find()->where(['user_id' => $model->id, 'payed' => \skeeks\cms\components\Cms::BOOL_Y])->count(); }]]]); ?> <? $pjax::end(); ?>
public function actions() { return ArrayHelper::merge(parent::actions(), ['index' => ["columns" => ['displayName', ['class' => \skeeks\cms\grid\UserColumnData::className(), 'attribute' => "user_id"], ['class' => \skeeks\cms\grid\DateTimeColumnData::className(), 'attribute' => "created_at"]]], 'create' => ['visible' => false]]); }
/** * @inheritdoc */ public function actions() { return ArrayHelper::merge(parent::actions(), ['index' => ["columns" => ['id', 'name', 'description', ['class' => \skeeks\cms\grid\DateTimeColumnData::className(), 'attribute' => "last_exec_at"], ['class' => \skeeks\cms\grid\DateTimeColumnData::className(), 'attribute' => "next_exec_at"], ['attribute' => "agent_interval"], ['class' => \skeeks\cms\grid\BooleanColumn::className(), 'attribute' => "active"]]], "activate-multi" => ['class' => AdminMultiModelEditAction::className(), "name" => "Активировать", "eachCallback" => [$this, 'eachMultiActivate']], "inActivate-multi" => ['class' => AdminMultiModelEditAction::className(), "name" => "Деактивировать", "eachCallback" => [$this, 'eachMultiInActivate']]]); }
/* @var $dataProvider yii\data\ActiveDataProvider */ ?> <? $pjax = \skeeks\cms\modules\admin\widgets\Pjax::begin(); ?> <?php echo $this->render('_search', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); ?> <?php echo \skeeks\cms\modules\admin\widgets\GridViewStandart::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'adminController' => $controller, 'pjax' => $pjax, 'columns' => [['attribute' => 'status', 'class' => \yii\grid\DataColumn::className(), 'filter' => \skeeks\modules\cms\form2\models\Form2FormSend::getStatuses(), 'format' => 'raw', 'value' => function (\skeeks\modules\cms\form2\models\Form2FormSend $model) { if ($model->status == \skeeks\modules\cms\form2\models\Form2FormSend::STATUS_NEW) { $class = "danger"; } else { if ($model->status == \skeeks\modules\cms\form2\models\Form2FormSend::STATUS_PROCESSED) { $class = "warning"; } else { if ($model->status == \skeeks\modules\cms\form2\models\Form2FormSend::STATUS_EXECUTED) { $class = "success"; } } } return '<span class="label label-' . $class . '">' . \yii\helpers\ArrayHelper::getValue(\skeeks\modules\cms\form2\models\Form2FormSend::getStatuses(), $model->status) . '</span>'; }], ['class' => \skeeks\cms\grid\DateTimeColumnData::className(), 'attribute' => 'processed_at'], ['class' => \skeeks\cms\grid\UserColumnData::className(), 'attribute' => 'processed_by'], ['attribute' => 'form_id', 'class' => \yii\grid\DataColumn::className(), 'filter' => \yii\helpers\ArrayHelper::map(\skeeks\modules\cms\form2\models\Form2Form::find()->all(), 'id', 'name'), 'value' => function (\skeeks\modules\cms\form2\models\Form2FormSend $model) { return $model->form->name; }], ['class' => \skeeks\cms\grid\CreatedAtColumn::className(), 'label' => 'Отправлена'], ['attribute' => 'site_code', 'class' => \yii\grid\DataColumn::className(), 'filter' => \yii\helpers\ArrayHelper::map(\skeeks\cms\models\CmsSite::find()->all(), 'code', 'name'), 'value' => function (\skeeks\modules\cms\form2\models\Form2FormSend $model) { return $model->site->name; }], 'comment']]); ?> <? $pjax::end(); ?>
<?php /** * index * * @author Semenov Alexander <*****@*****.**> * @link http://skeeks.com/ * @copyright 2010-2014 SkeekS (Sx) * @date 30.10.2014 * @since 1.0.0 */ /* @var $this yii\web\View */ /* @var $searchModel common\models\searchs\Game */ /* @var $dataProvider yii\data\ActiveDataProvider */ ?> <?php echo \skeeks\cms\modules\admin\widgets\GridViewStandart::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'adminController' => $controller, 'columns' => [['class' => \skeeks\cms\grid\ImageColumn2::className(), 'attribute' => 'image_id', 'relationName' => 'image'], 'username', 'name', ['class' => \skeeks\cms\grid\CreatedAtColumn::className()], ['class' => \skeeks\cms\grid\DateTimeColumnData::className(), 'attribute' => 'logged_at'], ['class' => \yii\grid\DataColumn::className(), 'value' => function (\skeeks\cms\models\User $model) { $result = []; if ($roles = \Yii::$app->authManager->getRolesByUser($model->id)) { foreach ($roles as $role) { $result[] = $role->description . " ({$role->name})"; } } return implode(', ', $result); }, 'format' => 'html', 'label' => \Yii::t('app', 'Roles')], ['class' => \skeeks\cms\grid\BooleanColumn::className(), 'attribute' => "active"]]]);
/** * @author Semenov Alexander <*****@*****.**> * @link http://skeeks.com/ * @copyright 2010 SkeekS (СкикС) * @date 02.06.2015 */ /* @var $this yii\web\View */ /* @var $searchModel \skeeks\cms\models\Search */ /* @var $dataProvider yii\data\ActiveDataProvider */ $dataProvider->query->andWhere(['type' => \skeeks\cms\shop\models\ShopDiscount::TYPE_DEFAULT]); ?> <? $pjax = \skeeks\cms\modules\admin\widgets\Pjax::begin(); ?> <?php echo $this->render('_search', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); ?> <?php echo \skeeks\cms\modules\admin\widgets\GridViewStandart::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'pjax' => $pjax, 'adminController' => \Yii::$app->controller, 'settingsData' => ['order' => SORT_ASC, 'orderBy' => "priority"], 'columns' => ['id', ['attribute' => 'name'], ['attribute' => 'value', 'class' => \yii\grid\DataColumn::className(), 'value' => function (\skeeks\cms\shop\models\ShopDiscount $shopDiscount) { if ($shopDiscount->value_type == \skeeks\cms\shop\models\ShopDiscount::VALUE_TYPE_P) { return \Yii::$app->formatter->asPercent($shopDiscount->value / 100); } else { $money = \skeeks\modules\cms\money\Money::fromString((string) $shopDiscount->value, $shopDiscount->currency_code); return \Yii::$app->money->intlFormatter()->format($money); } }], ['attribute' => 'active', 'class' => \skeeks\cms\grid\BooleanColumn::className()], ['attribute' => 'active_from', 'class' => \skeeks\cms\grid\DateTimeColumnData::className()], ['attribute' => 'active_to', 'class' => \skeeks\cms\grid\DateTimeColumnData::className()], ['class' => \skeeks\cms\grid\UpdatedByColumn::className()], ['class' => \skeeks\cms\grid\UpdatedAtColumn::className()], 'priority']]); ?> <? $pjax::end(); ?>
/** * @inheritdoc */ public function actions() { return ArrayHelper::merge(parent::actions(), ['create' => ['visible' => false], 'index' => ["columns" => ['phrase', ['class' => \skeeks\cms\grid\DateTimeColumnData::className(), 'attribute' => "created_at"], ['attribute' => "result_count"], ['attribute' => "pages"], ['class' => SiteColumn::className()]]]]); }
<?php /** * @author Semenov Alexander <*****@*****.**> * @link http://skeeks.com/ * @copyright 2010 SkeekS (СкикС) * @date 18.06.2015 */ return [['class' => \skeeks\cms\grid\ImageColumn2::className()], 'name', ['class' => \skeeks\cms\grid\CreatedAtColumn::className()], ['class' => \skeeks\cms\grid\UpdatedAtColumn::className()], ['class' => \skeeks\cms\grid\PublishedAtColumn::className()], ['class' => \skeeks\cms\grid\DateTimeColumnData::className(), 'attribute' => "published_to"], ['class' => \skeeks\cms\grid\CreatedByColumn::className()], ['class' => \yii\grid\DataColumn::className(), 'value' => function (\skeeks\cms\models\CmsContentElement $model) { if (!$model->cmsTree) { return null; } $path = []; if ($model->cmsTree->parents) { foreach ($model->cmsTree->parents as $parent) { if ($parent->isRoot()) { $path[] = "[" . $parent->site->name . "] " . $parent->name; } else { $path[] = $parent->name; } } } $path = implode(" / ", $path); return "<small><a href='{$model->cmsTree->url}' target='_blank' data-pjax='0'>{$path} / {$model->cmsTree->name}</a></small>"; }, 'format' => 'raw', 'filter' => \skeeks\cms\helpers\TreeOptions::getAllMultiOptions(), 'attribute' => 'tree_id'], ['class' => \yii\grid\DataColumn::className(), 'value' => function (\skeeks\cms\models\CmsContentElement $model) { $result = []; if ($model->cmsContentElementTrees) { foreach ($model->cmsContentElementTrees as $contentElementTree) { $site = $contentElementTree->tree->root->site; $result[] = "<small><a href='{$contentElementTree->tree->url}' target='_blank' data-pjax='0'>[{$site->name}]/.../{$contentElementTree->tree->name}</a></small>"; }
/** * @param CmsContent $cmsContent * @return array */ public static function getDefaultColumns($cmsContent = null) { $columns = [['class' => \skeeks\cms\grid\ImageColumn2::className()], 'name', ['class' => \skeeks\cms\grid\CreatedAtColumn::className()], ['class' => \skeeks\cms\grid\UpdatedAtColumn::className(), 'visible' => false], ['class' => \skeeks\cms\grid\PublishedAtColumn::className(), 'visible' => false], ['class' => \skeeks\cms\grid\DateTimeColumnData::className(), 'attribute' => "published_to", 'visible' => false], ['class' => \skeeks\cms\grid\CreatedByColumn::className()], ['class' => \yii\grid\DataColumn::className(), 'value' => function (\skeeks\cms\models\CmsContentElement $model) { if (!$model->cmsTree) { return null; } $path = []; if ($model->cmsTree->parents) { foreach ($model->cmsTree->parents as $parent) { if ($parent->isRoot()) { $path[] = "[" . $parent->site->name . "] " . $parent->name; } else { $path[] = $parent->name; } } } $path = implode(" / ", $path); return "<small><a href='{$model->cmsTree->url}' target='_blank' data-pjax='0'>{$path} / {$model->cmsTree->name}</a></small>"; }, 'format' => 'raw', 'filter' => \skeeks\cms\helpers\TreeOptions::getAllMultiOptions(), 'attribute' => 'tree_id'], 'additionalSections' => ['class' => \yii\grid\DataColumn::className(), 'value' => function (\skeeks\cms\models\CmsContentElement $model) { $result = []; if ($model->cmsContentElementTrees) { foreach ($model->cmsContentElementTrees as $contentElementTree) { $site = $contentElementTree->tree->root->site; $result[] = "<small><a href='{$contentElementTree->tree->url}' target='_blank' data-pjax='0'>[{$site->name}]/.../{$contentElementTree->tree->name}</a></small>"; } } return implode('<br />', $result); }, 'format' => 'raw', 'label' => \Yii::t('skeeks/cms', 'Additional sections'), 'visible' => false], ['attribute' => 'active', 'class' => \skeeks\cms\grid\BooleanColumn::className()], ['class' => \yii\grid\DataColumn::className(), 'label' => "Смотреть", 'value' => function (\skeeks\cms\models\CmsContentElement $model) { return \yii\helpers\Html::a('<i class="glyphicon glyphicon-arrow-right"></i>', $model->absoluteUrl, ['target' => '_blank', 'title' => \Yii::t('skeeks/cms', 'Watch to site (opens new window)'), 'data-pjax' => '0', 'class' => 'btn btn-default btn-sm']); }, 'format' => 'raw']]; return $columns; }
$searchRelatedPropertiesModel->load(\Yii::$app->request->get()); if ($dataProvider) { $searchRelatedPropertiesModel->search($dataProvider, $user->tableName()); } if ($user->relatedPropertiesModel) { $autoColumns = \skeeks\cms\modules\admin\widgets\GridViewStandart::getColumnsByRelatedPropertiesModel($user->relatedPropertiesModel, $searchRelatedPropertiesModel); } ?> <?php echo $this->render('_search', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); ?> <?php echo \skeeks\cms\modules\admin\widgets\GridViewStandart::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'adminController' => $controller, 'pjax' => $pjax, 'columns' => \yii\helpers\ArrayHelper::merge([['class' => \skeeks\cms\grid\ImageColumn2::className(), 'attribute' => 'image_id', 'relationName' => 'image'], 'username', 'name', 'email', ['class' => \skeeks\cms\grid\BooleanColumn::className(), 'attribute' => "email_is_approved", 'trueValue' => 1, 'falseValue' => 0], 'phone', ['class' => \skeeks\cms\grid\BooleanColumn::className(), 'attribute' => "phone_is_approved", 'trueValue' => 1, 'falseValue' => 0], ['class' => \skeeks\cms\grid\CreatedAtColumn::className()], ['class' => \skeeks\cms\grid\DateTimeColumnData::className(), 'attribute' => 'logged_at'], ['class' => \yii\grid\DataColumn::className(), 'filter' => \yii\helpers\Html::activeListBox($searchModel, 'role', \yii\helpers\ArrayHelper::merge(['' => ' - '], \yii\helpers\ArrayHelper::map(\Yii::$app->authManager->getRoles(), 'name', 'description')), ['size' => 1, 'class' => 'form-control']), 'value' => function (\skeeks\cms\models\User $model) { $result = []; if ($roles = \Yii::$app->authManager->getRolesByUser($model->id)) { foreach ($roles as $role) { $result[] = $role->description . " ({$role->name})"; } } return implode(', ', $result); }, 'format' => 'html', 'label' => \Yii::t('skeeks/cms', 'Roles')], ['class' => \skeeks\cms\grid\BooleanColumn::className(), 'attribute' => "active"], ['class' => \yii\grid\DataColumn::className(), 'label' => "Смотреть", 'value' => function (\skeeks\cms\models\CmsUser $model) { return \yii\helpers\Html::a('<i class="glyphicon glyphicon-arrow-right"></i>', $model->getProfileUrl(), ['target' => '_blank', 'title' => \Yii::t('skeeks/cms', 'Watch to site (opens new window)'), 'data-pjax' => '0', 'class' => 'btn btn-default btn-sm']); }, 'format' => 'raw'], ['class' => \skeeks\cms\grid\DateTimeColumnData::className(), 'attribute' => 'last_activity_at', 'visible' => false]], $autoColumns)]); ?> <? $pjax::end(); ?>
<?php $fuser = \skeeks\cms\shop\models\ShopFuser::find()->where(['user_id' => $model->id])->one(); ?> <?php echo $form->fieldSet(\skeeks\cms\shop\Module::t('app', 'Basket') . ' (' . \skeeks\cms\shop\models\ShopBasket::find()->where(['fuser_id' => $fuser->id])->count() . ")"); ?> <?php echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \skeeks\cms\shop\Module::t('app', 'At the moment the user in a basket')]); ?> <?php echo \skeeks\cms\modules\admin\widgets\GridView::widget(['dataProvider' => new \yii\data\ActiveDataProvider(['query' => \skeeks\cms\shop\models\ShopBasket::find()->where(['fuser_id' => $fuser->id])]), 'columns' => [['class' => \skeeks\cms\grid\DateTimeColumnData::className(), 'attribute' => 'created_at'], ['class' => \yii\grid\DataColumn::className(), 'attribute' => 'name'], ['class' => \yii\grid\DataColumn::className(), 'label' => \skeeks\cms\shop\Module::t('app', 'Price'), 'value' => function (\skeeks\cms\shop\models\ShopBasket $shopBasket) { return \Yii::$app->money->intlFormatter()->format($shopBasket->money); }], ['class' => \yii\grid\DataColumn::className(), 'attribute' => 'quantity'], ['class' => \yii\grid\DataColumn::className(), 'attribute' => 'site_id']]]); ?> <?php echo $form->fieldSetEnd(); ?> <?php echo $form->fieldSet(\skeeks\cms\shop\Module::t('app', 'Viewed products') . " (" . \skeeks\cms\shop\models\ShopViewedProduct::find()->where(['shop_fuser_id' => $fuser->id])->count() . ")"); ?> <?php echo \skeeks\cms\modules\admin\widgets\GridView::widget(['dataProvider' => new \yii\data\ActiveDataProvider(['query' => \skeeks\cms\shop\models\ShopViewedProduct::find()->where(['shop_fuser_id' => $fuser->id])]), 'columns' => [['class' => \skeeks\cms\grid\CreatedAtColumn::className(), 'label' => \skeeks\cms\shop\Module::t('app', 'Date views')], ['class' => \yii\grid\DataColumn::className(), 'label' => \skeeks\cms\shop\Module::t('app', 'Good'), 'value' => function (\skeeks\cms\shop\models\ShopViewedProduct $shopViewedProduct) {
$search = new \skeeks\cms\models\Search(\skeeks\cms\models\CmsUser::className()); $dataProvider = $search->getDataProvider(); $dataProvider->sort->defaultOrder = [ 'created_at' => SORT_DESC ]; $dataProvider = $search->search(\Yii::$app->request->queryParams); $searchModel = $search->loadedModel; ?> <?php echo \skeeks\cms\modules\admin\widgets\GridViewStandart::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'adminController' => @$controller, 'enabledCheckbox' => false, 'columns' => [['class' => \yii\grid\DataColumn::className(), 'value' => function (\skeeks\cms\models\User $model) { return \yii\helpers\Html::a('<i class="glyphicon glyphicon-circle-arrow-left"></i> ' . \Yii::t('skeeks/cms', 'Choose'), '#', ['class' => 'btn btn-primary sx-row-action', 'onclick' => 'sx.SelectCmsElement.submit(' . \yii\helpers\Json::encode($model->toArray([], ['displayName'])) . '); return false;', 'data-pjax' => 0]); }, 'format' => 'raw'], ['class' => \skeeks\cms\grid\ImageColumn2::className(), 'attribute' => 'image_id', 'relationName' => 'image'], 'username', 'name', 'email', 'phone', ['class' => \skeeks\cms\grid\CreatedAtColumn::className()], ['class' => \skeeks\cms\grid\DateTimeColumnData::className(), 'attribute' => 'logged_at'], ['class' => \yii\grid\DataColumn::className(), 'value' => function (\skeeks\cms\models\User $model) { $result = []; if ($roles = \Yii::$app->authManager->getRolesByUser($model->id)) { foreach ($roles as $role) { $result[] = $role->description . " ({$role->name})"; } } return implode(', ', $result); }, 'format' => 'html', 'label' => \Yii::t('skeeks/cms', 'Roles')], ['class' => \skeeks\cms\grid\BooleanColumn::className(), 'attribute' => "active"]]]); ?>
<?php /** * @author Semenov Alexander <*****@*****.**> * @link http://skeeks.com/ * @copyright 2010 SkeekS (СкикС) * @date 15.06.2015 */ /* @var $this yii\web\View */ /* @var $dataProvider yii\data\ActiveDataProvider */ ?> <? $pjax = \yii\widgets\Pjax::begin(); ?> <?php echo $this->render('_search', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); ?> <?php echo \skeeks\cms\modules\admin\widgets\GridViewStandart::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'adminController' => $controller, 'pjax' => $pjax, 'columns' => [['attribute' => 'level', 'value' => function ($model) { return \yii\log\Logger::getLevelName($model->level); }, 'filter' => [\yii\log\Logger::LEVEL_ERROR => 'error', \yii\log\Logger::LEVEL_WARNING => 'warning', \yii\log\Logger::LEVEL_INFO => 'info', \yii\log\Logger::LEVEL_TRACE => 'trace', \yii\log\Logger::LEVEL_PROFILE_BEGIN => 'profile begin', \yii\log\Logger::LEVEL_PROFILE_END => 'profile end']], ['attribute' => 'category'], ['attribute' => 'prefix', 'visible' => false], ['class' => \skeeks\cms\grid\DateTimeColumnData::className(), 'attribute' => 'log_time'], ['class' => \yii\grid\DataColumn::className(), 'value' => function ($model) { return "<pre><code>" . substr(\yii\helpers\Html::encode($model->message), 0, 200) . '</code></pre>'; }, 'attribute' => 'message', 'format' => 'raw']]]); ?> <? \yii\widgets\Pjax::end(); ?>