protected function createDataProvider() : ActiveDataProvider
    {
        $query = $this->buildQuery();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'sort'  => [
                'defaultOrder' => $this->defaultOrder
            ]
        ]);

        if (!$this->load($this->requestData())) {
            return $dataProvider;
        }
        if (!$this->validate()) {
            $query->where('0=1');
            return $dataProvider;
        }
        $this->buildFilter($query);

        return $dataProvider;
    }