for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* File containing the eZ\Publish\API\Repository\Values\Content\Query\Criterion\IsFieldEmpty class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
namespace eZ\Publish\API\Repository\Values\Content\Query\Criterion;
use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
use eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications;
* A criterion that matches content based on if Field is empty.
class IsFieldEmpty extends Criterion
{
* @param string $fieldDefinitionIdentifier
* @param bool $value
* @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException
public function __construct(string $fieldDefinitionIdentifier, bool $value = true)
parent::__construct($fieldDefinitionIdentifier, null, $value);
}
public function getSpecifications()
return [
new Specifications(Operator::EQ, Specifications::FORMAT_SINGLE, Specifications::TYPE_BOOLEAN),
];