src/controllers/ExtensionsController.php
public function actionSearch($sort = '', $type = Extension::TYPE_DOTPLANT, $query = '')
    {
        $packagist = self::getPackagist();
        $type = empty($type) ? Extension::TYPE_DOTPLANT : $type;
        $filters = ['type' => $type];
        if (1 === preg_match('{([\\\\/])}', $query, $m)) {
            $queryArray = explode($m[0], $query);
            $filters['vendor'] = array_shift($queryArray);
        }
        $packages = $packagist->search($query, $filters);
        return $this->renderResponse(
            'search',
            [
                'dataProvider' => new ArrayDataProvider([
                    'allModels' => $packages,
                    'pagination' => [
                        'defaultPageSize' => 10,
                        'pageSize' => ExtensionsManager::module()->extensionsPerPage,
                    ],
                ]),
                'type' => $type,
            ]
        );
    }
public function actionSearch($sort = '', $type = Extension::TYPE_DOTPLANT, $query = '')
    {
        $packagist = self::getPackagist();
        $type = empty($type) ? Extension::TYPE_DOTPLANT : $type;
        $filters = ['type' => $type];
        if (1 === preg_match('{([\\\\/])}', $query, $m)) {
            $queryArray = explode($m[0], $query);
            $filters['vendor'] = array_shift($queryArray);
        }
        $packages = $packagist->search($query, $filters);
        return $this->renderResponse(
            'search',
            [
                'dataProvider' => new ArrayDataProvider([
                    'allModels' => $packages,
                    'pagination' => [
                        'defaultPageSize' => 10,
                        'pageSize' => ExtensionsManager::module()->extensionsPerPage,
                    ],
                ]),
                'type' => $type,
            ]
        );
    }
Searching extensions packages using packagist API.
Pckagist API gives us ability to filter packages by type and vendor.
Supported types are: Extension::getTypes();
Vendor filter extracts from query string. If query string contains / or \ all string before it will be
recognized as vendor and added into API query.

@param string $sort
@param string $type
@param string $query
@return \DevGroup\AdminUtils\response\AjaxResponse|string