Download the PHP package elstc/cakephp-restore-query without Composer
On this page you can find all versions of the php package elstc/cakephp-restore-query. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elstc/cakephp-restore-query
More information about elstc/cakephp-restore-query
Files in elstc/cakephp-restore-query
Package cakephp-restore-query
Short Description Retaining and Restoring query strings plugin for CakePHP 3
License MIT
Informations about the package cakephp-restore-query
Retaining and Restoring query strings plugin for CakePHP
This plugin provides a component that makes it possible to restore the conditions in the list, search page, etc. even after transitioning to another page.
Requirements
- CakePHP 3.x
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
Add the following line to your application config/bootstrap.php
:
Usage
Retaining query string
Load the component with your controller's initialize
method.
The component automatically saves the Query string for the target action.
Restore saved query string
By creating a link in the template as follows, the component will call the saved query string and redirect to the target page.
Elastic/RestoreQuery.RestoreQueryComponent Options
actions
List of actions to record the query string.
default: ['index', 'search']
sessionKey
Name of session key for query string saving
default: 'StoredQuerystring'
restoreKey
Name of the query string for restore action.
default: '_restore'
redirect
Redirect when restoring the query string.
default: true