Skip to content

Owner Criterion

The OwnerCriterion Criterion searches for orders based on the user reference.

Arguments

  • UserReference object - \Ibexa\Contracts\Core\Repository\Values\User\UserReference(int $userId)

Example

1
2
3
4
5
$query = new OrderQuery(
    new \Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\OwnerCriterion(
        \Ibexa\Contracts\Core\Repository\Values\User\UserReference(14)
    )
);

OwnerCriterion Criterion accepts also multiple values:

1
2
3
4
5
6
7
8
$query = new OrderQuery(
    new \Ibexa\Contracts\OrderManagement\Value\Order\Query\Criterion\OwnerCriterion(
        [
           \Ibexa\Contracts\Core\Repository\Values\User\UserReference(14),
           \Ibexa\Contracts\Core\Repository\Values\User\UserReference(123),
        ]
    )
);