Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

passedArgs should be data or parsedData in the documentations #4

Closed
ghost opened this issue Jun 23, 2010 · 2 comments
Closed

passedArgs should be data or parsedData in the documentations #4

ghost opened this issue Jun 23, 2010 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 23, 2010

I think

$this->Article->parseCriteria($this->passedArgs);

should be

$this->Article->parseCriteria($this->data['Article']);

or

$this->Article->parseCriteria($this->parsedData['Article']);

in README and the documentation at http://cakedc.com/downloads/view/cakephp_search_plugin.

@burzum
Copy link
Contributor

burzum commented Jul 9, 2010

Check the bottom of the README, what you're looking for is explained there:

commonProcess method defined in Prg component allow you to inject search in any index controller with just 1-2 lines of additional code.
You should pass model name that used for search. By default it is default Controller::modelClass model.

If there still issues or questions just ask.

@HHammer
Copy link

HHammer commented Sep 6, 2010

I occurred the same problem concerning this issue.

In this case, the sample code of controller class defines "array('field' => 'status', 'type' => 'checkbox'),".

The sample code doesn't work when the status check box was selected multiple values.
(The SQL code will be generated like "WHERE Article.status = (1|2)" and returns incorrect result.)

To solve this problem, I specified argument "$this->data['Article']" to parseCriteria.

I think it was very complicated to understand how it works.

Any right ways to do this?

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants