XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
UserRecountForm.class.php
1<?php
3 * @package User
4 * @author Kazuhisa Minato aka minahito, Core developer
5 * @version $Id: UserRecountForm.class.php,v 1.1 2007/05/15 02:34:39 minahito Exp $
6 */
7
8if (!defined('XOOPS_ROOT_PATH')) {
9 exit();
10}
11
12require_once XOOPS_ROOT_PATH . '/core/XCube_ActionForm.class.php';
13require_once XOOPS_MODULE_PATH . '/legacy/class/Legacy_Validator.class.php';
14
16{
17 public function getTokenName()
18 {
19 return 'module.user.RecountForm.TOKEN' . $this->get('uid');
20 }
21
22 public function prepare()
23 {
24 //
25 // Set form properties
26 //
27 $this->mFormProperties['uid'] =new XCube_IntProperty('uid');
28
29 //
30 // Set field properties
31 //
32 $this->mFieldProperties['uid'] =new XCube_FieldProperty($this);
33 $this->mFieldProperties['uid']->setDependsByArray(['required', 'objectExist']);
34 $this->mFieldProperties['uid']->addMessage('required', _MD_USER_ERROR_REQUIRED, _MD_USER_LANG_UID);
35 $this->mFieldProperties['uid']->addMessage('objectExist', _AD_USER_ERROR_OBJECTEXIST, _MD_USER_LANG_UID);
36 $this->mFieldProperties['uid']->addVar('handler', 'users');
37 $this->mFieldProperties['uid']->addVar('module', 'user');
38 }
39
40 public function load(&$obj)
41 {
42 $this->set('uid', $obj->get('uid'));
43 }
44
45 public function update(&$obj)
46 {
47 $obj->set('uid', $this->get('uid'));
48 }
49}
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.