XCL Web Application Platform
2.5.0
The XoopsCube Legacy Project
📘
Loading...
Searching...
No Matches
TplsetEditForm.class.php
1
<?php
6
7
if
(!defined(
'XOOPS_ROOT_PATH'
)) {
8
exit();
9
}
10
11
require_once XOOPS_ROOT_PATH .
'/core/XCube_ActionForm.class.php'
;
12
require_once XOOPS_MODULE_PATH .
'/legacy/class/Legacy_Validator.class.php'
;
13
14
class
LegacyRender_TplsetEditForm
extends
XCube_ActionForm
15
{
16
public
function
getTokenName
()
17
{
18
return
'module.legacyRender.TplsetEditForm.TOKEN'
. $this->
get
(
'tplset_id'
);
19
}
20
21
public
function
prepare
()
22
{
23
//
24
// Set form properties
25
//
26
$this->mFormProperties[
'tplset_id'
] =
new
XCube_IntProperty
(
'tplset_id'
);
27
$this->mFormProperties[
'tplset_desc'
] =
new
XCube_StringProperty
(
'tplset_desc'
);
28
$this->mFormProperties[
'tplset_credits'
] =
new
XCube_TextProperty
(
'tplset_credits'
);
29
30
//
31
// Set field properties
32
//
33
$this->mFieldProperties[
'tplset_id'
] =
new
XCube_FieldProperty
($this);
34
$this->mFieldProperties[
'tplset_id'
]->setDependsByArray([
'required'
]);
35
$this->mFieldProperties[
'tplset_id'
]->addMessage(
'required'
, _AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_TPLSET_ID);
36
37
$this->mFieldProperties[
'tplset_desc'
] =
new
XCube_FieldProperty
($this);
38
$this->mFieldProperties[
'tplset_desc'
]->setDependsByArray([
'maxlength'
]);
39
$this->mFieldProperties[
'tplset_desc'
]->addMessage(
'maxlength'
, _AD_LEGACYRENDER_ERROR_MAXLENGTH, _AD_LEGACYRENDER_LANG_TPLSET_DESC,
'191'
);
40
$this->mFieldProperties[
'tplset_desc'
]->addVar(
'maxlength'
, 191);
41
}
42
43
public
function
load
(&$obj)
44
{
45
$this->
set
(
'tplset_id'
, $obj->get(
'tplset_id'
));
46
$this->
set
(
'tplset_desc'
, $obj->get(
'tplset_desc'
));
47
$this->
set
(
'tplset_credits'
, $obj->get(
'tplset_credits'
));
48
}
49
50
public
function
update
(&$obj)
51
{
52
$obj->set(
'tplset_id'
, $this->
get
(
'tplset_id'
));
53
$obj->set(
'tplset_desc'
, $this->
get
(
'tplset_desc'
));
54
$obj->set(
'tplset_credits'
, $this->
get
(
'tplset_credits'
));
55
}
56
}
LegacyRender_TplsetEditForm
Definition
TplsetEditForm.class.php:15
LegacyRender_TplsetEditForm\update
update(&$obj)
[Abstract] Updates an object with properties values.
Definition
TplsetEditForm.class.php:50
LegacyRender_TplsetEditForm\getTokenName
getTokenName()
Gets the token name of this actionform's token.
Definition
TplsetEditForm.class.php:16
LegacyRender_TplsetEditForm\prepare
prepare()
[Abstract] Set up form properties and field properties.
Definition
TplsetEditForm.class.php:21
LegacyRender_TplsetEditForm\load
load(&$obj)
[Abstract] Initializes properties' values from an object.
Definition
TplsetEditForm.class.php:43
XCube_ActionForm
Definition
XCube_ActionForm.class.php:51
XCube_FieldProperty
[Abstract] Used for validating member property values of XCube_ActionForm.
Definition
XCube_ActionForm.class.php:438
XCube_IntProperty
Represents int property.
Definition
XCube_Property.class.php:461
XCube_StringProperty
Represents string property.
Definition
XCube_Property.class.php:506
XCube_TextProperty
Represents string property which allows CR and LF.
Definition
XCube_Property.class.php:540
html
modules
legacyRender
admin
forms
TplsetEditForm.class.php
Generated by
1.13.2