17 public $mTargetObject =
null;
19 public function _getId()
21 return xoops_getrequest(
'tpl_id');
24 public function &_getHandler()
26 $handler =& xoops_getmodulehandler(
'tplfile');
30 public function _setupObject()
32 $id = $this->_getId();
34 $this->mObjectHandler =& $this->_getHandler();
35 $obj =& $this->mObjectHandler->get($id);
41 if (is_object($obj) &&
'default' == $obj->get(
'tpl_tplset')) {
42 $this->mObject =& $obj->createClone(xoops_getrequest(
'tpl_tplset'));
46 public function isEnableCreate()
51 public function _setupActionForm()
54 $this->mActionForm->prepare();
57 public function executeViewInput(&$controller, &$xoopsUser, &$render)
59 $render->setTemplateName(
'tplfile_clone.html');
60 $render->setAttribute(
'actionForm', $this->mActionForm);
61 $render->setAttribute(
'object', $this->mObject);
62 $render->setAttribute(
'tpl_id', xoops_getrequest(
'tpl_id'));
65 public function executeViewSuccess(&$controller, &$xoopsUser, &$render)
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);