Cakephp Plugin Search cakeDC Usage

I’m using the 2.0 version of cakephp search plugins by cakeDC (with cakephp 2.x) here . I’m need search in many models but thats models aren’t related. So I created a new model (search) and a controller (searches) . I got this error

“Notice (8): Indirect modification of overloaded property SearchesController::$paginate has no effect [APP/Controller/SearchesController.php, line 17]”

Model:

App::uses('AppModel', 'Model');
 class Search extends AppModel {
 public $actsAs = array('Search.Searchable');
 public $useTable = false;
 public $filterArgs = array( 'terminada' =>
 array( 'type' =>
 'like', 'field' =>
 array( 'Sludge.terminada', 'SurfacesWater.terminada', 'ResidualWater.termianda', 'UndergroundWater.terminada', 'PotableWater.terminada', 'SpecifiedsResidualsWater.terminada' ) ), 'revisada' =>
 array( 'type' =>
 'like', 'field' =>
 array( 'Sludge.revisada', 'SurfacesWater.revisada', 'ResidualWater.revisada', 'UndergroundWater.revisada', 'PotableWater.revisada', 'SpecifiedsResidualsWater.revisada' ) ), 'eliminada' =>
 array( 'type' =>
 'like', 'field' =>
 array( 'Sludge.eliminada', 'SurfacesWater.eliminada', 'ResidualWater.eliminada', 'UndergroundWater.eliminada', 'PotableWater.eliminada', 'SpecifiedsResidualsWater.eliminada' ) ), );
 public function orConditionsDates($data = array()) {
 $start = date('Y-m-d');
 $end = date('Y-m-d', strtotime('-1 month'));
 $cond = array( 'OR' =>
 array( $this->
alias . '.monitoreofecha LIKE <
=' =>
 $end, $this->
alias . '.monitoreofecha LIKE >
=' =>
 $start, ));
 return $cond;
 }
 }
 

Controller:

App::uses('AppController', 'Controller');
 class SearchesController extends AppController {
 public $components = array('Search.Prg');
 public $presetVars = true;
 // using the model configuration public function index() {
 $this->
Prg->
commonProcess();
 $this->
paginate['conditions'] = $this->
Search->
parseCriteria($this->
passedArgs);
 $this->
set('searches', $this->
paginate());
 }
 }
 

The view is the same of any index make with bake Any idea how what is my mistake? Thanks for all!!

 

Leave a Reply

Your email address will not be published. Required fields are marked *