NotConstraint
class NotConstraint implements ConstraintInterface
NotConstraint class.
The NotConstraint inverts the result of its value. The value of the NotConstraint must be another constraint.
A typical use case for the NotConstraint is the inversion of whitelists to blacklists. If for example a user should not be able to see entries of a specific content type, it can either be achieved by denying access to those content types or by allowing access to all but the entries of the content type:
{
"not": {
"equals": [{"doc": "sys.contentType.sys.id"}, "content-type-id"]
}
}
Methods
Details
at line 43
__construct(ConstraintInterface $child = null)
NotConstraint constructor.
at line 51
ConstraintInterface|null
getChild()
at line 59
NotConstraint
setChild(ConstraintInterface $child)
at line 69
jsonSerialize()
{@inheritdoc}