Core/Matcher/LocationMatcher.php 1 location
|
@@ 93-100 (lines=8) @@
|
| 90 |
|
} |
| 91 |
|
return new Query\Criterion\Location\Depth(self::$operatorsMap[$operator], $match); |
| 92 |
|
|
| 93 |
|
case self::MATCH_IS_MAIN_LOCATION: |
| 94 |
|
/// @todo error/warning if there is more than 1 value... |
| 95 |
|
$value = reset($values); |
| 96 |
|
if ($value) { |
| 97 |
|
return new Query\Criterion\Location\IsMainLocation(Query\Criterion\Location\IsMainLocation::MAIN); |
| 98 |
|
} else { |
| 99 |
|
return new Query\Criterion\Location\IsMainLocation(Query\Criterion\Location\IsMainLocation::NOT_MAIN); |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
case self::MATCH_PRIORITY: |
| 103 |
|
$match = reset($values); |
Core/Matcher/QueryBasedMatcher.php 1 location
|
@@ 185-192 (lines=8) @@
|
| 182 |
|
case self::MATCH_SUBTREE: |
| 183 |
|
return new Query\Criterion\Subtree($values); |
| 184 |
|
|
| 185 |
|
case self::MATCH_VISIBILITY: |
| 186 |
|
/// @todo error/warning if there is more than 1 value... |
| 187 |
|
$value = reset($values); |
| 188 |
|
if ($value) { |
| 189 |
|
return new Query\Criterion\Visibility(Query\Criterion\Visibility::VISIBLE); |
| 190 |
|
} else { |
| 191 |
|
return new Query\Criterion\Visibility(Query\Criterion\Visibility::HIDDEN); |
| 192 |
|
} |
| 193 |
|
|
| 194 |
|
case self::MATCH_AND: |
| 195 |
|
$subCriteria = array(); |