public function _createContent(&$toReturn) { $moduleName = CopixZone::getParam('moduleName'); $arDependency = CopixModule::getDependenciesForDelete($moduleName); $tpl = new CopixTpl(); $tpl->assign('arDependency', $arDependency); $tpl->assign('arModuleToDelete', $arDependency); CopixSession::set('arModuleToDelete', $arDependency, 'copix'); $tpl->assign('id', uniqid()); $tpl->assign('arModuleToDelete', $arDependency); $toReturn = $tpl->fetch('delete.script.tpl'); return true; }
public function _createContent(&$toReturn) { $moduleName = CopixZone::getParam('moduleName'); $infos = CopixModule::getInformations($moduleName); $tpl = new CopixTpl(); if (in_array($moduleName, CopixModule::getList())) { $arModule = CopixModule::getDependenciesForDelete($moduleName); $template = 'detailmoduledelete.tpl'; $record = _dao('Copix:copixmodule')->get($moduleName); $tpl->assign('version', $record->version_cpm); } else { $arDependencies = CopixModule::getDependenciesForInstall($moduleName); $arModule = array(); $arExtension = array(); $install = true; foreach ($arDependencies as $key => $dependency) { if ($dependency->kind === 'module') { if (CopixModule::testDependency($dependency)) { $dependency->exists = true; $dependency->isInabled = CopixModule::isEnabled($dependency->name); $arModule[] = $dependency; } else { $dependency->exists = false; $install = false; $arModule[] = $dependency; } } else { if (CopixModule::testDependency($dependency)) { $dependency->exists = true; $arExtension[] = $dependency; } else { $dependency->exists = false; $install = false; $arExtension[] = $dependency; } } } $tpl->assign('arExtension', $arExtension); $tpl->assign('install', $install); $template = 'detailmoduleinstall.tpl'; } $tpl->assign('path', CopixModule::getPath($moduleName)); $tpl->assign('arModule', $arModule); $tpl->assign('info', $infos); $tpl->assign('moduleName', $moduleName); $toReturn = $tpl->fetch($template); return true; }