コード例 #1
0
 public function afterInitialization()
 {
     parent::afterInitialization();
     $this->adminPanelMenuRegister();
     $this->container->dispatcher->addListener('app.beforeRun', function ($event) {
         $event->getApp()->group('/admin', function () {
             AdminRouteCollection::register($this);
         })->add(new AuthMiddleware());
     }, -980);
 }
コード例 #2
0
 public function uninstallModule()
 {
     parent::uninstallModule();
     $this->container->get('db')->schema()->dropIfExists('options');
     $this->container->get('db')->schema()->dropIfExists('options_group');
 }
コード例 #3
0
ファイル: Module.php プロジェクト: andrey900/slimcms
 public function uninstallModule()
 {
     parent::uninstallModule();
     $this->registerDB();
     $installMicroModule = new CustomizerAdminPanelModule();
     $installMicroModule->uninstallModule();
     $installMicroModule = new PublicModule();
     $installMicroModule->uninstallModule();
     $installMicroModule = new AuthModule();
     $installMicroModule->uninstallModule();
     $installMicroModule = new SystemOptionsModule();
     $installMicroModule->uninstallModule();
     $this->saveConfigForModule(self::class, ["params" => ["installed" => false, "active" => false]]);
 }
コード例 #4
0
ファイル: Module.php プロジェクト: andrey900/slimcms
 public function uninstallModule()
 {
     parent::uninstallModule();
     $this->container->get('db')->schema()->table('pages', function ($table) {
         $table->dropColumn('category_id');
     });
     $this->container->get('db')->schema()->dropIfExists('sections');
     $path = RESOURCE_PATH . 'models_field_info/pages.json';
     $pagesField = FileWorker::getJsonDataFile($path);
     if ($pagesField) {
         $cId = false;
         foreach ($pagesField as $k => $field) {
             if ($field->name == 'url_prefix') {
                 $field->type = "string";
                 continue;
             }
             if ($field->name == 'category_id') {
                 $cId = $k;
                 continue;
             }
         }
         if ($cId !== false) {
             unset($pagesField[$cId]);
             FileWorker::saveJsonFile($path, $pagesField);
         }
     }
     FileWorker::removeItemInModelsFillable('Pages', 'category_id');
     $this->saveConfigForModule(self::class, ["params" => ["installed" => false, "active" => false]]);
 }
コード例 #5
0
ファイル: Module.php プロジェクト: andrey900/slimcms
 public function uninstallModule()
 {
     parent::uninstallModule();
     $this->saveConfigForModule(self::class, ["params" => ["installed" => false, "active" => false]]);
 }
コード例 #6
0
 public function uninstallModule()
 {
     parent::uninstallModule();
     $this->container->get('db')->schema()->dropIfExists('user_views_settings');
 }