XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
TplsetDeleteAction.class.php
1<?php
6
7if (!defined('XOOPS_ROOT_PATH')) {
8 exit();
9}
10
11require_once XOOPS_MODULE_PATH . '/legacyRender/class/AbstractDeleteAction.class.php';
12require_once XOOPS_MODULE_PATH . '/legacyRender/admin/forms/TplsetDeleteForm.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 $id = $this->_getId();
30
31 $this->mObjectHandler = $this->_getHandler();
32
33 $this->mObject =& $this->mObjectHandler->get($id);
34 if (is_object($this->mObject) && 'default' == $this->mObject->get('tplset_name')) {
35 $this->mObject = null;
36 }
37 }
38
39 public function _setupActionForm()
40 {
41 $this->mActionForm =new LegacyRender_TplsetDeleteForm();
42 $this->mActionForm->prepare();
43 }
44
45 public function executeViewInput(&$controller, &$xoopsUser, &$render)
46 {
47 $render->setTemplateName('tplset_delete.html');
48 $render->setAttribute('actionForm', $this->mActionForm);
49 $render->setAttribute('object', $this->mObject);
50 }
51
52 public function executeViewSuccess(&$controller, &$xoopsUser, &$render)
53 {
54 $controller->executeForward('./index.php?action=TplsetList');
55 }
56
57 public function executeViewError(&$controller, &$xoopsUser, &$render)
58 {
59 $controller->executeRedirect('./index.php?action=TplsetList', 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED);
60 }
61
62 public function executeViewCancel(&$controller, &$xoopsUser, &$render)
63 {
64 $controller->executeForward('./index.php?action=TplsetList');
65 }
66}