ModelBundle/Document/Area.php
public function setBlocks(ArrayCollection $blocks)
    {
        $this->blocks->clear();
        foreach ($blocks as $block) {
            $this->blocks->add($block);
        }
    }
public function setBlocks(ArrayCollection $blocks)
    {
        $this->blocks->clear();
        foreach ($blocks as $block) {
            $this->blocks->add($block);
        }
    }
Set blocks

@param ArrayCollection $blocks