/** * Installs plugin. * * @param array $params */ public function install(array $params) { if (empty($params['key'])) { OW::getFeedback()->error(OW::getLanguage()->text('admin', 'manage_plugins_install_empty_key_error_message')); $this->redirectToAction('available'); } try { $pluginDto = $this->pluginService->install(trim($params['key'])); OW::getFeedback()->info(OW::getLanguage()->text('admin', 'manage_plugins_install_success_message', array('plugin' => $pluginDto->getTitle()))); } catch (LogicException $e) { if (OW_DEBUG_MODE) { throw $e; } OW::getFeedback()->error(OW::getLanguage()->text('admin', 'manage_plugins_install_error_message', array('key' => empty($pluginDto) ? '_INVALID_' : $pluginDto->getKey()))); } $this->redirectToAction('index'); }