1: <?php
2: 3: 4: 5:
6:
7: if (!defined('XOOPS_ROOT_PATH')) exit();
8:
9: require_once XOOPS_MODULE_PATH . "/legacyRender/class/AbstractEditAction.class.php";
10: require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplsetEditForm.class.php";
11:
12: class LegacyRender_TplsetEditAction extends LegacyRender_AbstractEditAction
13: {
14: function _getId()
15: {
16: return xoops_getrequest('tplset_id');
17: }
18:
19: function &_getHandler()
20: {
21: $handler =& xoops_getmodulehandler('tplset');
22: return $handler;
23: }
24:
25: function _setupObject()
26: {
27: parent::_setupObject();
28:
29: if ($this->isAllowDefault() == false) {
30: if (is_object($this->mObject) && $this->mObject->get('tplset_name') == 'default') {
31: $this->mObject = null;
32: }
33: }
34: }
35:
36: function _setupActionForm()
37: {
38: $this->mActionForm =new LegacyRender_TplsetEditForm();
39: $this->mActionForm->prepare();
40: }
41:
42: function isEnableCreate()
43: {
44: return false;
45: }
46:
47: function isAllowDefault()
48: {
49: return false;
50: }
51:
52: function executeViewInput(&$controller, &$xoopsUser, &$render)
53: {
54: $render->setTemplateName("tplset_edit.html");
55: $render->setAttribute('actionForm', $this->mActionForm);
56: $render->setAttribute('object', $this->mObject);
57: }
58:
59: function executeViewSuccess(&$controller, &$xoopsUser, &$render)
60: {
61: $controller->executeForward("./index.php?action=TplsetList");
62: }
63:
64: function executeViewError(&$controller, &$xoopsUser, &$render)
65: {
66: $controller->executeRedirect("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED);
67: }
68:
69: function executeViewCancel(&$controller, &$xoopsUser, &$render)
70: {
71: $controller->executeForward("./index.php?action=TplsetList");
72: }
73: }
74:
75: ?>
76: