示例#1
0
 /**
  * Adds spec. uninstall page route name.
  *
  * @param string $key
  * @param string $routName
  */
 public function addUninstallRouteName($key, $routName)
 {
     $plugin = $this->pluginService->findPluginByKey(trim($key));
     if ($plugin !== null) {
         $plugin->setUninstallRoute($routName);
         $this->pluginService->savePlugin($plugin);
     }
 }
示例#2
0
 private function getPluginDtoByKey($params)
 {
     if (!empty($params['key'])) {
         $pluginDto = $this->pluginService->findPluginByKey(trim($params['key']));
     }
     if (!empty($pluginDto)) {
         return $pluginDto;
     }
     OW::getFeedback()->error(OW::getLanguage()->text('admin', 'manage_plugins_plugin_not_found'));
     $this->redirectToAction('index');
 }
示例#3
0
 private function updateItemsUpdateStatus(array $items)
 {
     if (empty($items)) {
         return;
     }
     foreach ($items as $item) {
         if ($item[self::URI_VAR_ITEM_TYPE] == self::URI_VAR_ITEM_TYPE_VAL_PLUGIN) {
             $dto = $this->pluginService->findPluginByKey($item[self::URI_VAR_KEY], $item[self::URI_VAR_DEV_KEY]);
             if ($dto != null) {
                 $dto->setUpdate(BOL_PluginService::PLUGIN_STATUS_UPDATE);
                 $this->pluginService->savePlugin($dto);
             }
         } else {
             if ($item[self::URI_VAR_ITEM_TYPE] == self::URI_VAR_ITEM_TYPE_VAL_THEME) {
                 $dto = $this->themeService->findThemeByKey($item[self::URI_VAR_KEY]);
                 if ($dto != null && $dto->getDeveloperKey() == $item[self::URI_VAR_DEV_KEY]) {
                     $dto->setUpdate(BOL_ThemeService::THEME_STATUS_UPDATE);
                     $this->themeService->saveTheme($dto);
                 }
             }
         }
     }
 }