nodesagency/Platform-Crud-Plugin — pull request #24 by AD7six (2012-12-13 17:51:55+00:00)
Title: WIP add a search event

An event which provides a simple mechanism to add a search to any
paginated index.

It can be utilized by adding the following to relevant controllers:

/**
* Before Filter callback:
**/
public function beforeFilter() {
if (isset($this->request->query['q'])) {
App::uses('SearchConditionsEvent', 'Crud.Controller/Event');
$this->getEventManager()->attach(new SearchConditionsEvent());
}
parent::beforeFilter();
}

Put in the app controller to be able to use in any controller