示例#1
0
 /**
  * Activates plugin.
  *
  * @param array $params
  */
 public function activate(array $params)
 {
     $pluginDto = $this->getPluginDtoByKey($params);
     $language = OW::getLanguage();
     $this->pluginService->activate($pluginDto->getKey());
     // trigger event
     $event = new OW_Event(OW_EventManager::ON_AFTER_PLUGIN_ACTIVATE, array('pluginKey' => $pluginDto->getKey()));
     OW::getEventManager()->trigger($event);
     OW::getFeedback()->info(OW::getLanguage()->text('admin', 'manage_plugins_activate_success_message', array('plugin' => $pluginDto->getTitle())));
     $this->redirectToAction('index');
 }