php - Setup dynamic search in CakePHP -


i using search plugin cakephp.

i try dynamically setup $filterargs array used filtering input user. reason why want because customers can create customer specific input fields. want make them filterable , searchable.

customer.php:

public function beforefind($querydata) {     $this->filterargs['garantie'] = array(         'type' => 'subquery',         'method' => 'findcustomercustomfieldsbytext',         'field' => array('customer.id'),         'encode' => true         ); } 

debugging $filterargs shows entry made:

array(     'garantie' => array(         'type' => 'subquery',         'method' => 'findcustomercustomfieldsbytext',         'field' => array(             (int) 0 => 'customer.id'         ),         'encode' => true     ) ) 

unfortunately method findcustomercustomfieldsbytext() not called.

it looks beforefind() might not correct method call. callback-method should use can use dynamic creation of $filterargs?

edit: question not identical linked question because callback methods prevent filter working.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -