module_sortlist.php

Go to the documentation of this file.
00001 <?php
00002 
00007 class Module_Sortlist extends oxAdminDetails
00008 {
00009 
00016     public function render()
00017     {
00018         $sOxId = $this->getEditObjectId();
00019 
00020         parent::render();
00021 
00022         $oModulelist = oxNew( "oxModulelist" );
00023 
00024         $this->_aViewData["aExtClasses"] = $this->getConfig()->getAllModules();
00025 
00026         $this->_aViewData["aDisabledModules"] = $oModulelist->getDisabledModuleClasses();
00027 
00028         // checking if there are any deleted extensions
00029         if ( oxSession::getVar( "blSkipDeletedExtCheking" ) == false ) {
00030             $aDeletedExt = $oModulelist->getDeletedExtensions();
00031         }
00032 
00033         if ( !empty($aDeletedExt) ) {
00034             $this->_aViewData["aDeletedExt"] = $aDeletedExt;
00035         }
00036 
00037         return 'module_sortlist.tpl';
00038     }
00039 
00045     public function save()
00046     {
00047         $aModule = oxConfig::getParameter("aModules");
00048 
00049         $aModules = json_decode( $aModule, true );
00050 
00051         $oModule = oxNew( "oxModule" );
00052         $aModules = $oModule->buildModuleChains( $aModules );
00053 
00054         $this->getConfig()->saveShopConfVar( "aarr", "aModules", $aModules );
00055     }
00056 
00062     public function remove()
00063     {
00064         //if user selected not to update modules, skipping all updates
00065         if ( oxConfig::getParameter( "noButton" )) {
00066             oxSession::getInstance()->setVar( "blSkipDeletedExtCheking", true );
00067             return;
00068         }
00069 
00070         $oModulelist = oxNew( "oxModulelist" );
00071         $oModulelist->cleanup();
00072     }
00073 }