XCL Web Application Platform
2.5.0
The XoopsCube Legacy Project
📘
Loading...
Searching...
No Matches
TplfileEditForm.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
13
/***
14
* @internal
15
* This class is generated by makeActionForm tool.
16
*/
17
class
LegacyRender_TplfileEditForm
extends
XCube_ActionForm
18
{
19
public
function
getTokenName
()
20
{
21
return
'module.legacyRender.TplfileEditForm.TOKEN.'
. $this->
get
(
'tpl_id'
);
22
}
23
24
public
function
prepare
()
25
{
26
//
27
// Set form properties
28
//
29
$this->mFormProperties[
'tpl_id'
] =
new
XCube_IntProperty
(
'tpl_id'
);
30
$this->mFormProperties[
'tpl_desc'
] =
new
XCube_StringProperty
(
'tpl_desc'
);
31
$this->mFormProperties[
'tpl_source'
] =
new
XCube_TextProperty
(
'tpl_source'
);
32
33
//
34
// Set field properties
35
//
36
$this->mFieldProperties[
'tpl_id'
] =
new
XCube_FieldProperty
($this);
37
$this->mFieldProperties[
'tpl_id'
]->setDependsByArray([
'required'
]);
38
$this->mFieldProperties[
'tpl_id'
]->addMessage(
'required'
, _AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_TPL_ID);
39
40
$this->mFieldProperties[
'tpl_desc'
] =
new
XCube_FieldProperty
($this);
41
$this->mFieldProperties[
'tpl_desc'
]->setDependsByArray([
'maxlength'
]);
42
$this->mFieldProperties[
'tpl_desc'
]->addMessage(
'maxlength'
, _AD_LEGACYRENDER_ERROR_MAXLENGTH, _AD_LEGACYRENDER_LANG_TPL_DESC,
'255'
);
43
$this->mFieldProperties[
'tpl_desc'
]->addVar(
'maxlength'
, 255);
44
45
$this->mFieldProperties[
'tpl_source'
] =
new
XCube_FieldProperty
($this);
46
$this->mFieldProperties[
'tpl_source'
]->setDependsByArray([
'required'
]);
47
$this->mFieldProperties[
'tpl_source'
]->addMessage(
'required'
, _AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_TPL_SOURCE);
48
}
49
50
public
function
load
(&$obj)
51
{
52
$obj->loadSource();
53
54
$this->
set
(
'tpl_id'
, $obj->get(
'tpl_id'
));
55
$this->
set
(
'tpl_desc'
, $obj->get(
'tpl_desc'
));
56
$this->
set
(
'tpl_source'
, $obj->Source->get(
'tpl_source'
));
57
}
58
59
public
function
update
(&$obj)
60
{
61
$obj->loadSource();
62
63
$obj->set(
'tpl_id'
, $this->
get
(
'tpl_id'
));
64
$obj->set(
'tpl_desc'
, $this->
get
(
'tpl_desc'
));
65
66
$obj->set(
'tpl_lastmodified'
, time());
67
68
$obj->Source->set(
'tpl_source'
, $this->
get
(
'tpl_source'
));
69
}
70
}
LegacyRender_TplfileEditForm
Definition
TplfileEditForm.class.php:18
LegacyRender_TplfileEditForm\update
update(&$obj)
[Abstract] Updates an object with properties values.
Definition
TplfileEditForm.class.php:59
LegacyRender_TplfileEditForm\getTokenName
getTokenName()
Gets the token name of this actionform's token.
Definition
TplfileEditForm.class.php:19
LegacyRender_TplfileEditForm\prepare
prepare()
[Abstract] Set up form properties and field properties.
Definition
TplfileEditForm.class.php:24
LegacyRender_TplfileEditForm\load
load(&$obj)
[Abstract] Initializes properties' values from an object.
Definition
TplfileEditForm.class.php:50
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
TplfileEditForm.class.php
Generated by
1.13.2