예제 #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, 'page') === 'all';
     if ($this->_isShowAll) {
         $this->dataProvider->pagination = false;
     }
     parent::init();
 }
예제 #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, $this->defaultPagination) === 'all';
     if ($this->_isShowAll) {
         /** @noinspection PhpUndefinedFieldInspection */
         $this->dataProvider->pagination = false;
     }
     $this->_toggleButtonId = $this->options['id'] . '-togdata-' . ($this->_isShowAll ? 'all' : 'page');
     parent::init();
 }