php 'modules' => [ 'gridview' => [ 'class' => 'kartik\grid\Module', 'downloadAction' => '/gridview/export/download' // your grid export download setting ] ]
Since: 1.0
Author: Kartik Visweswaran (kartikv2@gmail.com)
Inheritance: extends kartik\base\Module
Exemple #1
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     $this->_module = Config::initModule(Module::classname());
     if (empty($this->options['id'])) {
         $this->options['id'] = $this->getId();
     }
     if (!$this->toggleData) {
         parent::init();
         return;
     }
     $this->_toggleDataKey = '_tog' . hash('crc32', $this->options['id']);
     $this->_isShowAll = ArrayHelper::getValue($_GET, $this->_toggleDataKey, $this->defaultPagination) === 'all';
     if ($this->_isShowAll) {
         /** @noinspection PhpUndefinedFieldInspection */
         $this->dataProvider->pagination = false;
     }
     $this->_toggleButtonId = $this->options['id'] . '-togdata-' . ($this->_isShowAll ? 'all' : 'page');
     parent::init();
 }
Exemple #2
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     $this->_module = Config::initModule(Module::classname());
     if (empty($this->options['id'])) {
         $this->options['id'] = $this->getId();
     }
     if (!$this->toggleData) {
         parent::init();
         return;
     }
     $this->_toggleDataKey = '_tog' . hash('crc32', $this->options['id']);
     $this->_isShowAll = ArrayHelper::getValue($_GET, $this->_toggleDataKey, 'page') === 'all';
     if ($this->_isShowAll) {
         $this->dataProvider->pagination = false;
     }
     parent::init();
 }
<?php

return ['vendorPath' => dirname(dirname(__DIR__)) . '/vendor', 'modules' => ['user' => ['class' => \abhimanyu\user\UserModule::className(), 'layout' => '@backend/views/layouts/admin'], 'installer' => ['class' => \abhimanyu\installer\InstallerModule::className()], 'gridview' => ['class' => \kartik\grid\Module::className()]], 'components' => ['db' => ['class' => \yii\db\Connection::className(), 'dsn' => 'mysql:host=localhost;dbname='], 'user' => ['identityClass' => \abhimanyu\user\models\UserIdentity::className(), 'loginUrl' => ['/user/auth/login']], 'config' => ['class' => \abhimanyu\config\components\Config::className()], 'urlManager' => ['enablePrettyUrl' => TRUE, 'showScriptName' => FALSE]], 'params' => ['installed' => FALSE]];