Пример #1
0
 public function actionUninstall($id)
 {
     Modularity::deleteAll(['id' => $id]);
     $modules = $this->modularityService->getAllModules();
     if (isset($modules[$id]) && $modules[$id]['instance'] !== null) {
         $modules[$id]['instance']->uninstall();
     }
     return $this->redirect(['index']);
 }
Пример #2
0
 public function actionUninstall($id)
 {
     Modularity::deleteAll(['id' => $id]);
     $moduleManager = LuLu::$app->moduleManager;
     $modules = $moduleManager->loadModules();
     if (isset($modules[$id]) && $modules[$id]['instance'] !== null) {
         $modules[$id]['instance']->uninstall();
     }
     return $this->redirect(['index']);
 }
Пример #3
0
 /**
  * 卸载
  * 'canInstall' => true
  * 'canUninstall' => true
  * 'hasAdmin' => true
  * 'hasHome' => true
  * 'canActiveAdmin' => false
  * 'canActiveHome' => false
  * @param type $id
  * @return type
  */
 public function actionUninstall($id)
 {
     $lastBreadcrumb = "Uninstall Modularity";
     $this->setMenus(12, $lastBreadcrumb);
     Modularity::deleteAll(['id' => $id]);
     $modules = $this->modularityService->getAllModules();
     if (isset($modules[$id]) && $modules[$id]['instance'] !== null) {
         $modules[$id]['instance']->uninstall();
     }
     return $this->redirect(['index', 'message' => \Yii::t('yii', '{attribute} Success', ['attribute' => LsYii::gT($lastBreadcrumb)])]);
 }