Piwik\Plugins\Marketplace\Api\Client::searchForPlugins PHP Method

searchForPlugins() public method

public searchForPlugins ( $keywords, $query, $sort, $purchaseType )
    public function searchForPlugins($keywords, $query, $sort, $purchaseType)
    {
        $response = $this->fetch('plugins', array('keywords' => $keywords, 'query' => $query, 'sort' => $sort, 'purchase_type' => $purchaseType));
        if (!empty($response['plugins'])) {
            return $this->removeNotNeededPluginsFromResponse($response);
        }
        return array();
    }

Usage Example

Beispiel #1
0
 public function render()
 {
     $isAdminPage = Common::getRequestVar('isAdminPage', 0, 'int');
     if (!empty($isAdminPage)) {
         $template = 'getNewPluginsAdmin';
     } else {
         $template = 'getNewPlugins';
     }
     $plugins = $this->marketplaceApiClient->searchForPlugins('', '', Sort::METHOD_LAST_UPDATED, '');
     return $this->renderTemplate($template, array('plugins' => array_splice($plugins, 0, 3)));
 }
All Usage Examples Of Piwik\Plugins\Marketplace\Api\Client::searchForPlugins