Piwik\Plugins\Marketplace\Api\Client::searchForThemes PHP Méthode

searchForThemes() public méthode

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

Usage Example

Exemple #1
0
 public function searchPlugins($query, $sort, $themesOnly, $purchaseType = '')
 {
     if ($themesOnly) {
         $plugins = $this->marketplaceClient->searchForThemes('', $query, $sort, $purchaseType);
     } else {
         $plugins = $this->marketplaceClient->searchForPlugins('', $query, $sort, $purchaseType);
     }
     foreach ($plugins as $index => $plugin) {
         $plugins[$index] = $this->enrichPluginInformation($plugin);
     }
     return array_values($plugins);
 }