/** * Parses the grid detail configuration (for filter or sort). * * @param array $data the stored data to be parsed * @param string $category one of 'filter' or 'sort' * * @return void */ protected function parseDetailData($data, $category) { $dtlKey = "_{$category}Id"; if (!empty($this->{$dtlKey})) { $store = new DynaGridStore(['id' => $this->options['id'], 'storage' => $this->storage, 'userSpecific' => $this->userSpecific, 'category' => $category, 'dtlKey' => $this->{$dtlKey}]); $config = $store === null ? false : $store->fetch(); if ($config !== false) { $this->_detailConfig[$category] = $config; } } }
/** * Deletes grid configuration settings from store * * @return void * @throws \yii\base\InvalidConfigException */ public function deleteSettings() { $master = new DynaGridStore(['id' => $this->dynaGridId, 'category' => DynaGridStore::STORE_GRID, 'storage' => $this->storage, 'userSpecific' => $this->userSpecific]); $config = $this->storage == DynaGrid::TYPE_DB ? null : $master->fetch(); $master->deleteConfig($this->category, $config); $this->store->delete(); }