13 public $mActionForm =
null;
14 public $mActiveTemplateSet =
null;
16 public function prepare(&$controller, &$xoopsUser, $moduleConfig)
18 LegacyRender_AbstractListAction::prepare($controller, $xoopsUser, $moduleConfig);
20 $this->mActionForm->prepare();
23 public function &_getHandler()
25 $handler =& xoops_getmodulehandler(
'tplset');
29 public function &_getFilterForm()
35 public function _getBaseUrl()
37 return './index.php?action=TplsetList';
40 public function execute(&$controller, &$xoopsUser)
42 $this->mActionForm->fetch();
43 $this->mActionForm->validate();
44 if (!$this->mActionForm->hasError()) {
45 $configHandler =& xoops_gethandler(
'config');
48 $criteria->add(
new Criteria(
'conf_name',
'template_set'));
49 $criteria->add(
new Criteria(
'conf_catid', XOOPS_CONF));
51 $configs =& $configHandler->getConfigs($criteria);
52 if ((is_countable($configs) ? count($configs) : 0) > 0) {
53 $configs[0]->set(
'conf_value', $this->mActionForm->get(
'tplset_name'));
54 $configHandler->insertConfig($configs[0]);
55 $this->mActiveTemplateSet = $this->mActionForm->get(
'tplset_name');
59 return $this->getDefaultView($controller, $xoopsUser);
62 public function executeViewIndex(&$controller, &$xoopsUser, &$render)
67 foreach (array_keys($this->mObjects) as $key) {
68 $this->mObjects[$key]->loadModuletpl();
71 if (
null == $this->mActiveTemplateSet) {
72 $this->mActiveTemplateSet = $controller->mRoot->mContext->getXoopsConfig(
'template_set');
75 $render->setTemplateName(
'tplset_list.html');
76 $render->setAttribute(
'objects', $this->mObjects);
77 $render->setAttribute(
'pageNavi', $this->mFilter->mNavi);
78 $render->setAttribute(
'activeTemplateSet', $this->mActiveTemplateSet);
79 $render->setAttribute(
'actionForm', $this->mActionForm);
84 $handler =& xoops_getmodulehandler(
'tplfile');
85 $recentObjects =& $handler->getRecentModifyFile();
87 $render->setAttribute(
'recentObjects', $recentObjects);