Closed arambalakjian closed 10 years ago
Hi Aled,
Yea this change wa4s to bring it inline with the new DataList->filter() in SS3, instead of the where syntax that was used in DataObject::get() of 2.4
Essentially you now pass in an array to insert into filter(), take a look at the way the filter module does it here:
Shouldn't be too hard to work in your where in this format.
Essentially try to get it working on it's own as a YourClass::get()->filter(array($Var => $Value));
Then take the bit inside the filter() and return that from your getItemWhere() function.
Hope that helps!
Aram
Hi Aram
Happy New Year :)
I applied this latest DOAP update to a SS 3.1.2 implementation. My filters stopped working. However, I caveat that by saying I don't understand what the "new Filter Module" is.
For example in SS3.1.2/DOAP before 5b17acb was merged this subclass override used to work:
But now it throws add item array errors.
It doesn't matter if I simplify the return it still doesn't work. Only commenting getItemsWhere() out completely lets the page work again (desired filters are then off, of course).
Could you post a quick example of the new Filter Module syntax and how to override it from List Holder pages? Or is something else going on?
Many thanks Aled