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         parent::render();
00019 
00020         $oModuleList = oxNew( "oxModuleList" );
00021 
00022         $this->_aViewData["aExtClasses"] = $this->getConfig()->getAllModules();
00023         $this->_aViewData["aDisabledModules"] = $oModuleList->getDisabledModuleClasses();
00024 
00025         // checking if there are any deleted extensions
00026         if ( oxRegistry::getSession()->getVariable( "blSkipDeletedExtChecking" ) == false ) {
00027             $aDeletedExt = $oModuleList->getDeletedExtensions();
00028         }
00029 
00030         if ( !empty($aDeletedExt) ) {
00031             $this->_aViewData["aDeletedExt"] = $aDeletedExt;
00032         }
00033 
00034         return 'module_sortlist.tpl';
00035     }
00036 
00042     public function save()
00043     {
00044         $aModule = oxRegistry::getConfig()->getRequestParameter( "aModules" );
00045 
00046         $aModules = json_decode( $aModule, true );
00047 
00048         $oModule = oxNew( "oxModule" );
00049         $aModules = $oModule->buildModuleChains( $aModules );
00050 
00051         $this->getConfig()->saveShopConfVar( "aarr", "aModules", $aModules );
00052 
00053     }
00054 
00060     public function remove()
00061     {
00062         //if user selected not to update modules, skipping all updates
00063         if ( oxRegistry::getConfig()->getRequestParameter( "noButton" )) {
00064             oxRegistry::getSession()->setVariable( "blSkipDeletedExtChecking", true );
00065             return;
00066         }
00067 
00068         $oModuleList = oxNew( "oxModuleList" );
00069         $oModuleList->cleanup();
00070     }
00071 
00072 }