Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($travelTypeUid || $branchUid || $countryUid || $cityUid) {
- if ($travelTypeUid) {
- $logicAnd[] = $query->equals('travelType.uid', $travelTypeUid);
- }
- if ($branch) {
- $logicAnd[] = $query->equals('branch.uid', $branchUid);
- }
- if ($country) {
- $logicAnd[] = $query->equals('city.country', $countryUid);
- }
- if ($city) {
- $logicAnd[] = $query->equals('city.uid', $cityUid);
- }
- } else {
- return $query->execute();
- }
- $query->matching($query->logicalAnd($logicAnd));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement