17 public function _getId()
19 return xoops_getrequest(
'tpl_id');
22 public function &_getHandler()
24 $handler =& xoops_getmodulehandler(
'tplfile');
28 public function _setupObject()
30 parent::_setupObject();
32 if (is_object($this->mObject) &&
'default' == $this->mObject->get(
'tpl_tplset')) {
33 $this->mObject =
null;
37 public function _setupActionForm()
40 $this->mActionForm->prepare();
43 public function isEnableCreate()
48 public function executeViewInput(&$controller, &$xoopsUser, &$render)
50 $render->setTemplateName(
'tplfile_edit.html');
51 $render->setAttribute(
'actionForm', $this->mActionForm);
52 $render->setAttribute(
'object', $this->mObject);
55 public function executeViewSuccess(&$controller, &$xoopsUser, &$render)
61 require_once XOOPS_ROOT_PATH .
'/class/template.php';
64 $xoopsTpl->clear_cache(
'db:' . $this->mObject->get(
'tpl_file'));
65 $xoopsTpl->clear_compiled_tpl(
'db:' . $this->mObject->get(
'tpl_file'));
67 $tplset = $this->mObject->get(
'tpl_tplset');
68 $module = $this->mObject->get(
'tpl_module');
69 $controller->executeForward(
"./index.php?action=TplfileList&tpl_tplset={$tplset}&tpl_module={$module}");
72 public function executeViewError(&$controller, &$xoopsUser, &$render)
74 $controller->executeRedirect(
'./index.php?action=TplsetList', 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED);
77 public function executeViewCancel(&$controller, &$xoopsUser, &$render)
79 $tplset = $this->mObject->get(
'tpl_tplset');
80 $module = $this->mObject->get(
'tpl_module');
81 $controller->executeForward(
"./index.php?action=TplfileList&tpl_tplset={$tplset}&tpl_module={$module}");