PHP Class Search\Controller\Component\PrgComponent

Inheritance: extends Cake\Controller\Component
Afficher le fichier Open project: friendsofcake/search Class Usage Examples

Protected Properties

Свойство Type Description
$_defaultConfig array ### Options - actions : Action name(s) to use PRG for. You can pass a single action as string or multiple as array. If boolean true all actions will be processed if false none. Default is ['index', 'lookup']. - queryStringToData : Set query string as request data. Default true. - queryStringWhitelist : An array of whitelisted query strings to be kept. Defaults to the Paginator 'sort', 'direction' and 'limit' ones.

Méthodes publiques

Méthode Description
conversion ( boolean $redirect = true ) : Response | null POST to GET / GET to POST conversion
startup ( ) : Response | null Checks if the current request has posted data and redirects the users to the same action after converting the post data into GET params

Méthodes protégées

Méthode Description
_actionCheck ( ) : boolean Checks if the action should be processed by the component.
_filterParams ( ) : array Filters the params from POST data and merges in the whitelisted query string ones.

Method Details

_actionCheck() protected méthode

Checks if the action should be processed by the component.
protected _actionCheck ( ) : boolean
Résultat boolean

_filterParams() protected méthode

Filters the params from POST data and merges in the whitelisted query string ones.
protected _filterParams ( ) : array
Résultat array

conversion() public méthode

POST to GET / GET to POST conversion
public conversion ( boolean $redirect = true ) : Response | null
$redirect boolean Redirect on post, default true.
Résultat Cake\Network\Response | null

startup() public méthode

Checks if the current request has posted data and redirects the users to the same action after converting the post data into GET params
public startup ( ) : Response | null
Résultat Cake\Network\Response | null

Property Details

$_defaultConfig protected_oe property

### Options - actions : Action name(s) to use PRG for. You can pass a single action as string or multiple as array. If boolean true all actions will be processed if false none. Default is ['index', 'lookup']. - queryStringToData : Set query string as request data. Default true. - queryStringWhitelist : An array of whitelisted query strings to be kept. Defaults to the Paginator 'sort', 'direction' and 'limit' ones.
protected array $_defaultConfig
Résultat array