Piwik\Plugins\Marketplace\Plugins::getPluginInfo PHP Метод

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

public getPluginInfo ( $pluginName )
    public function getPluginInfo($pluginName)
    {
        $plugin = $this->marketplaceClient->getPluginInfo($pluginName);
        $plugin = $this->enrichPluginInformation($plugin);
        return $plugin;
    }

Usage Example

Пример #1
0
 private function createUpdateOrInstallView($template, $nonceName)
 {
     Piwik::checkUserHasSuperUserAccess();
     $this->dieIfPluginsAdminIsDisabled();
     $this->displayWarningIfConfigFileNotWritable();
     $pluginName = $this->getPluginNameIfNonceValid($nonceName);
     $view = new View('@Marketplace/' . $template);
     $this->setBasicVariablesView($view);
     $view->errorMessage = '';
     $view->plugin = array('name' => $pluginName);
     try {
         $this->pluginInstaller->installOrUpdatePluginFromMarketplace($pluginName);
     } catch (\Exception $e) {
         $notification = new Notification($e->getMessage());
         $notification->context = Notification::CONTEXT_ERROR;
         $notification->type = Notification::TYPE_PERSISTENT;
         $notification->flags = Notification::FLAG_CLEAR;
         Notification\Manager::notify('CorePluginsAdmin_InstallPlugin', $notification);
         Url::redirectToReferrer();
         return;
     }
     $view->plugin = $this->plugins->getPluginInfo($pluginName);
     return $view;
 }