XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
ImageListForm.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.ImageSettingsForm.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['nicename']=new XCube_StringArrayProperty('nicename');
52 $this->mFormProperties['weight']=new XCube_IntArrayProperty('weight');
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['nicename'] =new XCube_FieldProperty($this);
59 $this->mFieldProperties['nicename']->setDependsByArray(['required']);
60 $this->mFieldProperties['nicename']->addMessage('required', _MD_LEGACY_ERROR_REQUIRED, _MD_LEGACY_LANG_IMAGE_NICENAME);
61
62 $this->mFieldProperties['weight'] =new XCube_FieldProperty($this);
63 $this->mFieldProperties['weight']->setDependsByArray(['required']);
64 $this->mFieldProperties['weight']->addMessage('required', _MD_LEGACY_ERROR_REQUIRED, _AD_LEGACY_LANG_IMAGE_WEIGHT);
65 }
66}
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>.
Represents string[] property. XCube_GenericArrayProperty<XCube_StringProperty>.