Closed kuiche closed 8 years ago
Adds a new Filter which uses callbacks. This is useful for simple filters for which an entire extra class/service is overkill.
Try in conjunction with the page loader. For example:
$pages = $pageLoader->loadFromFilters(new FilterCollection([ $filter = new \Message\Cog\Filter\CallbackFilter('cross-sell', 'CrossSell', function($qb) { return $qb ->orderBy('RAND()') ->where('page.type = \'product\'') ->limit(2); }) ]));
Adds a new Filter which uses callbacks. This is useful for simple filters for which an entire extra class/service is overkill.
Try in conjunction with the page loader. For example: