/** * @param \yii\base\Action $action * @return array */ private function getIndexRoute($action) { if ($this->indexRoute !== null) { return $this->indexRoute; } if ($action instanceof Action) { $searchModel = $action->getSearchModel(); /** @var ActiveQuery $query */ $query = $action->getQuery($searchModel); if ($query instanceof ActiveQuery) { return $this->indexRoute = ['index', 'query' => implode(',', $query->getActiveQueries())]; } } return $this->indexRoute = ['index']; }