OXID eShop CE  4.8.10
 All Classes Files Functions Variables Pages
module_sortlist.php
Go to the documentation of this file.
1 <?php
2 
8 {
9 
16  public function render()
17  {
19 
20  $oModuleList = oxNew( "oxModuleList" );
21 
22  $this->_aViewData["aExtClasses"] = $this->getConfig()->getAllModules();
23  $this->_aViewData["aDisabledModules"] = $oModuleList->getDisabledModuleClasses();
24 
25  // checking if there are any deleted extensions
26  if ( oxRegistry::getSession()->getVariable( "blSkipDeletedExtChecking" ) == false ) {
27  $aDeletedExt = $oModuleList->getDeletedExtensions();
28  }
29 
30  if ( !empty($aDeletedExt) ) {
31  $this->_aViewData["aDeletedExt"] = $aDeletedExt;
32  }
33 
34  return 'module_sortlist.tpl';
35  }
36 
42  public function save()
43  {
44  $aModule = oxRegistry::getConfig()->getRequestParameter( "aModules" );
45 
46  $aModules = json_decode( $aModule, true );
47 
48  $oModule = oxNew( "oxModule" );
49  $aModules = $oModule->buildModuleChains( $aModules );
50 
51  $this->getConfig()->saveShopConfVar( "aarr", "aModules", $aModules );
52 
53  }
54 
60  public function remove()
61  {
62  //if user selected not to update modules, skipping all updates
63  if ( oxRegistry::getConfig()->getRequestParameter( "noButton" )) {
64  oxRegistry::getSession()->setVariable( "blSkipDeletedExtChecking", true );
65  return;
66  }
67 
68  $oModuleList = oxNew( "oxModuleList" );
69  $oModuleList->cleanup();
70  }
71 
72 }