public function generateLocationIdExcludeCriterion(array $excludeLocations)
    {
        $excludeCriterion = array();
        foreach ($excludeLocations as $location) {
            if (!$location instanceof Location) {
                throw new InvalidArgumentType('excludeLocations', 'array of Location objects');
            }

            $excludeCriterion[] = new Criterion\LogicalNot(
                new Criterion\LocationId($location->id)
            );
        }

        return new Criterion\LogicalAnd($excludeCriterion);
    }
public function generateLocationIdExcludeCriterion(array $excludeLocations)
    {
        $excludeCriterion = array();
        foreach ($excludeLocations as $location) {
            if (!$location instanceof Location) {
                throw new InvalidArgumentType('excludeLocations', 'array of Location objects');
            }

            $excludeCriterion[] = new Criterion\LogicalNot(
                new Criterion\LocationId($location->id)
            );
        }

        return new Criterion\LogicalAnd($excludeCriterion);
    }
public function generateLocationIdExcludeCriterion ( array $ excludeLocations ) { $ excludeCriterion = array ( ) ; foreach ( $ excludeLocations as $ location ) { if ( ! $ location instanceof Location ) { throw new InvalidArgumentType ( 'excludeLocations' , 'array of Location objects' ) ; } $ excludeCriterion [ ] = new Criterion \ LogicalNot ( new Criterion \ LocationId ( $ location -> id ) ) ; } return new Criterion \ LogicalAnd ( $ excludeCriterion ) ; }
Generates an exclude criterion based on locationIds.

@param \eZ\Publish\API\Repository\Values\Content\Location[] $excludeLocations

@return \eZ\Publish\API\Repository\Values\Content\Query\Criterion\LogicalNot[]

@throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType
Generates an exclude criterion based on locationIds .