public function getSearchCriteria()
    {
        /* setting the default pagination for the page */
        if (!Yii::$app->session->get($this->MainModel . 'Pagination')) {
            Yii::$app->session->set($this->MainModel . 'Pagination', Yii::$app->getModule('core')->recordsPerPage);
        }
        $savedQueryParams = Yii::$app->session->get($this->MainModel . 'QueryParams');
        if (count($savedQueryParams)) {
            $queryParams = $savedQueryParams;
        } else {
            $queryParams = [substr($this->MainModelSearch, strrpos($this->MainModelSearch, "\\") + 1) => $this->defaultQueryParams];
        }
        /* use the same filters as before */
        if (count(Yii::$app->request->queryParams)) {
            $queryParams = array_merge($queryParams, Yii::$app->request->queryParams);
        }

        if (isset($queryParams['page'])) {
            $_GET['page'] = $queryParams['page'];
        }
        if (Yii::$app->request->getIsPjax()) {
            $this->layout = false;
        }
        Yii::$app->session->set($this->MainModel . 'QueryParams', $queryParams);
        $this->searchModel = new $this->MainModelSearch;
        $this->dataProvider = $this->searchModel->search($queryParams);
    }