While compiling a filter-set for a repository search criteria, I was wondering if I can make use of all known Magento 1 methods or if there are any differences.
Where are theses defined in the code (if), is there some kind of list maybe?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityIn Magento 2.1.0 I was able to spot a list of filter criteria within the API inside a comment (file: vendor/magento/framework/Api/CriteriaInterface.php:39)
* - ["from" => $fromValue, "to" => $toValue]
* - ["eq" => $equalValue]
* - ["neq" => $notEqualValue]
* - ["like" => $likeValue]
* - ["in" => [$inValues]]
* - ["nin" => [$notInValues]]
* - ["notnull" => $valueIsNotNull]
* - ["null" => $valueIsNull]
* - ["moreq" => $moreOrEqualValue]
* - ["gt" => $greaterValue]
* - ["lt" => $lessValue]
* - ["gteq" => $greaterOrEqualValue]
* - ["lteq" => $lessOrEqualValue]
* - ["finset" => $valueInSet]
The file comment has more information. Link to the public repository on Github:
Alan Storm has a higher-level introduction into the topic as well: