Last active
November 2, 2015 13:53
-
-
Save janit/732c5c73c420f43faf83 to your computer and use it in GitHub Desktop.
eZ Publish search api example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$contentTypes = array('article','blog_post'); | |
$contentTypes = array('eng-GB','fin-FI'); | |
$locationPath = '/2/30/44'; | |
$query = new Query(); | |
$query->filter = new Criterion\LogicalAnd( | |
array( | |
new Criterion\ContentTypeIdentifier($contentTypes), | |
new Criterion\Subtree($locationPath), | |
new Criterion\LanguageCode($languages), | |
) | |
); | |
$query->sortClauses = array( | |
new SortClause\DatePublished(), | |
); | |
$searchResults = $this->searchService->findContentInfo($query); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you meant
$languages = array('eng-GB','fin-FI');
on line 4.