XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
Legacy_SearchResultsForm Class Reference
Inheritance diagram for Legacy_SearchResultsForm:
XCube_ActionForm Legacy_SearchShowallForm Legacy_SearchShowallbyuserForm

Public Member Functions

 __construct ($keywordMin)
 
 prepare ()
 [Abstract] Set up form properties and field properties.
 
 fetch ()
 Fetches values through the request object.
 
 fetchAndor ()
 
 validate ()
 Validates fetched values.
 
 update (&$params)
 [Abstract] Updates an object with properties values.
 
- Public Member Functions inherited from XCube_ActionForm
 __construct ()
 Constructor.
 
 getTokenName ()
 Gets the token name of this actionform's token.
 
 getToken ()
 Gets the token value of this actionform's token.
 
 getTokenErrorMessage ()
 Gets a message about the failure of the token validation.
 
 set ()
 Sets the raw value as the value of the form property.
 
 setVar ()
 
 get ( $key, $index=null)
 Gets raw value.
 
 getVar ( $key, $index=null)
 
getFormProperties ()
 Gets form properties of this member property.
 
 _validateToken ()
 Validates the token.
 
 hasError ()
 Gets a value indicating whether this action form keeps error messages or error flag.
 
 addErrorMessage ( $message)
 Adds a message to the form's error message buffer.
 
 getErrorMessages ()
 Gets error messages.
 
 load (&$obj)
 [Abstract] Initializes properties' values from an object.
 

Data Fields

 $mQueries = []
 
 $_mKeywordMin = 0
 
- Data Fields inherited from XCube_ActionForm
 $mContext
 [READ ONLY] XCube_HttpContext
 
 $mUser
 [READ ONLY] XCube_Principal
 
 $mFormProperties = []
 XCube_FormProperty[].
 
 $mFieldProperties = []
 XCube_FieldProperty[].
 
 $mErrorFlag = false
 bool
 
 $mErrorMessages = []
 string[]
 
 $_mToken
 string
 

Detailed Description

Definition at line 18 of file SearchResultsForm.class.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( $keywordMin)

Definition at line 23 of file SearchResultsForm.class.php.

Member Function Documentation

◆ fetch()

fetch ( )

Fetches values through the request object.

Returns
void
See also
getFromRequest

Fetch the input value, set it and form properties. These values can be retrieved by the get() method. The subclass can define its own member function to fetch the values. Define member functions with name "fetch" + "form name". For example, to fetch the "message", define the function "fetchMessage()". The subclass function assigns a value to this action form.

function fetchModifytime()
{
$this->set('modifytime', time());
}

Reimplemented from XCube_ActionForm.

Definition at line 47 of file SearchResultsForm.class.php.

◆ fetchAndor()

fetchAndor ( )

Definition at line 78 of file SearchResultsForm.class.php.

◆ prepare()

prepare ( )

[Abstract] Set up form properties and field properties.

Reimplemented from XCube_ActionForm.

Reimplemented in Legacy_SearchShowallbyuserForm, and Legacy_SearchShowallForm.

Definition at line 29 of file SearchResultsForm.class.php.

◆ update()

update ( & $obj)

[Abstract] Updates an object with properties values.

Parameters
mixed$obj
Returns
void

Set input values to a object from this action form. This member function mediates between logic and the result of validations. For example, developers can use this method to set values to XoopsSimpleObject.

This member function is abstract. But, the subclass of this class does not have to implement it.

Reimplemented from XCube_ActionForm.

Reimplemented in Legacy_SearchShowallbyuserForm, and Legacy_SearchShowallForm.

Definition at line 94 of file SearchResultsForm.class.php.

◆ validate()

validate ( )

Validates fetched values.

Returns
void

Performs validation, so that if an input value is wrong, error messages are added to the error message buffer. The validation procedure is as follows:

  • 1. If this object has a token name, validate the unique one-time token.
  • 2. Call the member function to validate all the properties of the field.
  • 3. Call the member function that is defined in the subclass.

For a database, validations are performed by functions of the properties of each field. But, the subclass can define its own validation logic. Define member function with name "validate" + "form name". For example, to validate "message", define the function "validateMessage()".

Reimplemented from XCube_ActionForm.

Definition at line 85 of file SearchResultsForm.class.php.

Field Documentation

◆ $_mKeywordMin

$_mKeywordMin = 0

Definition at line 21 of file SearchResultsForm.class.php.

◆ $mQueries

$mQueries = []

Definition at line 20 of file SearchResultsForm.class.php.


The documentation for this class was generated from the following file: