Skip to content

LogicalNot Criterion

The LogicalNot Search Criterion matches content URL if the provided Criterion does not match.

It takes only one Criterion in the array parameter.

Arguments

  • criterion - represents the Criterion that should be negated

Example

1
2
3
$query->filter = new Criterion\LogicalNot(
    new Criterion\ContentTypeIdentifier($contentTypeId)
);

REST API

1
2
3
4
5
6
7
<Query>
    <Criterion>
        <LogicalNotCriterion>
            <ContentTypeIdentifierCriterion>article</ContentTypeIdentifierCriterion>
        </LogicalNotCriterion>
    </Criterion>
</Query>
1
2
3
4
5
6
7
8
9
{
  "Query": {
    "Criterion": {
      "LogicalNotCriterion": {
        "ContentTypeIdentifierCriterion": "article"
      }
    }
  }
}