public searchForPlugins ( $keywords, $query, $sort, $purchaseType ) |
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))); }
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); }