ApiPlatform\Core\Metadata\Resource\ResourceMetadata::withCollectionOperations PHP Method

withCollectionOperations() public method

Returns a new instance with the given collection operations.
public withCollectionOperations ( array $collectionOperations ) : self
$collectionOperations array
return self
    public function withCollectionOperations(array $collectionOperations) : self
    {
        $metadata = clone $this;
        $metadata->collectionOperations = $collectionOperations;
        return $metadata;
    }