XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
TplsetEditForm.class.php
1<?php
6
7if (!defined('XOOPS_ROOT_PATH')) {
8 exit();
9}
10
11require_once XOOPS_ROOT_PATH . '/core/XCube_ActionForm.class.php';
12require_once XOOPS_MODULE_PATH . '/legacy/class/Legacy_Validator.class.php';
13
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}
update(&$obj)
[Abstract] Updates an object with properties values.
getTokenName()
Gets the token name of this actionform's token.
prepare()
[Abstract] Set up form properties and field properties.
load(&$obj)
[Abstract] Initializes properties' values from an object.
[Abstract] Used for validating member property values of XCube_ActionForm.
Represents int property.
Represents string property.
Represents string property which allows CR and LF.