XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
SearchShowallbyuserForm.class.php
1<?php
10
11if (!defined('XOOPS_ROOT_PATH')) {
12 exit();
13}
14
15require_once XOOPS_ROOT_PATH . '/core/XCube_ActionForm.class.php';
16require_once XOOPS_MODULE_PATH . '/legacy/class/Legacy_Validator.class.php';
17
18require_once XOOPS_MODULE_PATH . '/legacy/forms/SearchShowallForm.class.php';
19
21{
22 public function prepare()
23 {
24 parent::prepare();
25
26 //
27 // Set form properties
28 //
29 $this->mFormProperties['uid'] =new XCube_IntProperty('uid');
30 $this->mFormProperties['mid'] =new XCube_IntProperty('mid');
31 $this->mFormProperties['start'] =new XCube_IntProperty('start');
32
33 //
34 // Set field properties
35 //
36 $this->mFieldProperties['uid'] =new XCube_FieldProperty($this);
37 $this->mFieldProperties['uid']->setDependsByArray(['required']);
38 $this->mFieldProperties['uid']->addMessage('required', _MD_LEGACY_ERROR_REQUIRED, _MD_LEGACY_LANG_UID);
39
40 $this->mFieldProperties['mid'] =new XCube_FieldProperty($this);
41 $this->mFieldProperties['mid']->setDependsByArray(['required']);
42 $this->mFieldProperties['mid']->addMessage('required', _MD_LEGACY_ERROR_REQUIRED, _MD_LEGACY_LANG_MID);
43 }
44
45 public function update(&$params)
46 {
47 $params['uid'] = $this->get('uid');
48 $params['start'] = $this->get('start');
49
50 if (defined('LEGACY_SEARCH_SHOWALL_MAXHIT')) {
51 $params['maxhit'] = LEGACY_SEARCH_SHOWALL_MAXHIT;
52 } else {
53 $params['maxhit'] = 20;
54 }
55 }
56}
update(&$params)
[Abstract] Updates an object with properties values.
prepare()
[Abstract] Set up form properties and field properties.
[Abstract] Used for validating member property values of XCube_ActionForm.
Represents int property.