XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
CommentListForm.class.php
1<?php
10
11if (!defined('XOOPS_ROOT_PATH')) {
12 exit();
13}
14
15require_once XOOPS_ROOT_PATH . '/core/XCube_ActionForm.class.php';
16require_once XOOPS_MODULE_PATH . '/legacy/class/Legacy_Validator.class.php';
17
23{
28 public function getTokenName()
29 {
30 //
31 //
32 if ('POST' == xoops_getenv('REQUEST_METHOD')) {
33 return 'module.legacy.CommentSettingsForm.TOKEN';
34 } else {
35 return null;
36 }
37 }
38
43 public function getTokenErrorMessage()
44 {
45 return null;
46 }
47
48 public function prepare()
49 {
50 // set properties
51 $this->mFormProperties['status'] =new XCube_IntArrayProperty('status');
52 $this->mFormProperties['delete']= new XCube_BoolArrayProperty('delete');
53 //to display error-msg at confirm-page
54 $this->mFormProperties['confirm'] =new XCube_BoolProperty('confirm');
55
56 // set fields
57 $this->mFieldProperties['status'] =new XCube_FieldProperty($this);
58 $this->mFieldProperties['status']->setDependsByArray(['required', 'objectExist']);
59 $this->mFieldProperties['status']->addMessage('required', _MD_LEGACY_ERROR_REQUIRED, _AD_LEGACY_LANG_COM_STATUS);
60 $this->mFieldProperties['status']->addMessage('objectExist', _AD_LEGACY_ERROR_OBJECTEXIST, _AD_LEGACY_LANG_COM_STATUS);
61 $this->mFieldProperties['status']->addVar('handler', 'commentstatus');
62 $this->mFieldProperties['status']->addVar('module', 'legacy');
63 }
64}
prepare()
[Abstract] Set up form properties and field properties.
Represents bool[] property. XCube_GenericArrayProperty<XCube_BoolProperty>.
Represents bool property.
[Abstract] Used for validating member property values of XCube_ActionForm.
Represents int[] property. XCube_GenericArrayProperty<XCube_IntProperty>.