OXID eShop CE  4.9.8
 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()->getModulesWithExtendedClass();
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 
40  public function save()
41  {
42  $aModule = oxRegistry::getConfig()->getRequestParameter("aModules");
43 
44  $aModules = json_decode($aModule, true);
45 
46  $oModuleInstaller = oxNew('oxModuleInstaller');
47  $aModules = $oModuleInstaller->buildModuleChains($aModules);
48 
49  $this->getConfig()->saveShopConfVar("aarr", "aModules", $aModules);
50 
51  }
52 
58  public function remove()
59  {
60  //if user selected not to update modules, skipping all updates
61  if (oxRegistry::getConfig()->getRequestParameter("noButton")) {
62  oxRegistry::getSession()->setVariable("blSkipDeletedExtChecking", true);
63 
64  return;
65  }
66 
67  $oModuleList = oxNew("oxModuleList");
68  $oModuleList->cleanup();
69  }
70 
71 }