hiqdev\assetpackagist\controllers\SiteController::actionSearch PHP Метод

actionSearch() публичный Метод

public actionSearch ( $query )
    public function actionSearch($query)
    {
        try {
            $package = $this->getAssetPackage($query);
            $params = ['package' => $package, 'query' => $query, 'forceUpdate' => false];
            if ($package->canAutoUpdate()) {
                $params['forceUpdate'] = true;
            }
        } catch (Exception $e) {
            $query = preg_replace('/[^a-z0-9-]/i', '', $query);
            return $this->render('notFound', compact('query'));
        }
        return $this->render('search', $params);
    }