XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
ImageEditAction.class.php
1<?php
11
12if (!defined('XOOPS_ROOT_PATH')) {
13 exit();
14}
15
16require_once XOOPS_MODULE_PATH . '/legacy/admin/actions/ImageCreateAction.class.php';
17require_once XOOPS_MODULE_PATH . '/legacy/admin/forms/ImageAdminEditForm.class.php';
18
20{
21 public function _getId()
22 {
23 return isset($_REQUEST['image_id']) ? xoops_getrequest('image_id') : 0;
24 }
25
26 public function _setupActionForm()
27 {
28 $this->mActionForm =new Legacy_ImageAdminEditForm();
29 $this->mActionForm->prepare();
30 }
31
32 public function isEnableCreate()
33 {
34 return false;
35 }
36
37 public function _enableCatchImgcat()
38 {
39 return false;
40 }
41
42 public function executeViewInput(&$controller, &$xoopsUser, &$render)
43 {
44 $this->mObject->loadImagecategory();
45
46 $render->setTemplateName('image_edit.html');
47 $render->setAttribute('actionForm', $this->mActionForm);
48 $render->setAttribute('object', $this->mObject);
49
50 $handler =& xoops_getmodulehandler('imagecategory', 'legacy');
51 $t_category = $handler->get($this->mObject->get('imgcat_id'));
52
53 $categoryArr =& $handler->getObjects(new Criteria('imgcat_storetype', $t_category->get('imgcat_storetype')));
54 $render->setAttribute('categoryArr', $categoryArr);
55 }
56
57 public function executeViewCancel(&$controller, &$xoopsUser, &$render)
58 {
59 $controller->executeForward('./index.php?action=ImageList&imgcat_id=' . $this->mObject->get('imgcat_id'));
60 }
61}