XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
SmilesListForm.class.php
1<?php
11
12if (!defined('XOOPS_ROOT_PATH')) {
13 exit();
14}
15
16require_once XOOPS_ROOT_PATH . '/core/XCube_ActionForm.class.php';
17
23{
28 public function getTokenName()
29 {
30 //
31 //
32 if ('POST' == xoops_getenv('REQUEST_METHOD')) {
33 return 'module.legacy.SmilesSettingsForm.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['code']=new XCube_StringArrayProperty('code');
52 $this->mFormProperties['emotion']=new XCube_StringArrayProperty('emotion');
53 $this->mFormProperties['display']=new XCube_BoolArrayProperty('display');
54 $this->mFormProperties['delete']=new XCube_BoolArrayProperty('delete');
55 //to display error-msg at confirm-page
56 $this->mFormProperties['confirm'] =new XCube_BoolProperty('confirm');
57 // set fields
58 $this->mFieldProperties['code']=new XCube_FieldProperty($this);
59 $this->mFieldProperties['code']->setDependsByArray(['required', 'maxlength']);
60 $this->mFieldProperties['code']->addMessage('required', _MD_LEGACY_ERROR_REQUIRED, _MD_LEGACY_LANG_CODE, '50');
61 $this->mFieldProperties['code']->addMessage('maxlength', _MD_LEGACY_ERROR_MAXLENGTH, _MD_LEGACY_LANG_CODE, '50');
62 $this->mFieldProperties['code']->addVar('maxlength', 50);
63
64 $this->mFieldProperties['emotion']=new XCube_FieldProperty($this);
65 $this->mFieldProperties['emotion']->setDependsByArray(['required', 'maxlength']);
66 $this->mFieldProperties['emotion']->addMessage('required', _MD_LEGACY_ERROR_REQUIRED, _MD_LEGACY_LANG_EMOTION, '75');
67 $this->mFieldProperties['emotion']->addMessage('maxlength', _MD_LEGACY_ERROR_MAXLENGTH, _MD_LEGACY_LANG_EMOTION, '75');
68 $this->mFieldProperties['emotion']->addVar('maxlength', 75);
69 }
70}
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 string[] property. XCube_GenericArrayProperty<XCube_StringProperty>.