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