php - Dynamically create the $filterArgs array in CakePHP -


is possible dynamically create $filterargs array in cakephp when using search plugin?

my customers able create own input fields (customer specific) , want make of them searchable. have map them in $filterargs array.

e.g.:

public $filterargs = array(     'input_filter' => array(         'type' => 'subquery',         'method' => 'findcustomercustomfieldsbytext',         'field' => 'customer.id',         'encode' => true     ) ); 

just add them conditionally need filterargs array.

if ($somefieldispresentcheckhere) {     $this->model->filterargs['something'] = [ /* settings go here */ ]; } 

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? -