public function setPosition(BasePage $page)
    {
        if ($page->getParent()) {
            $pageNb = count($page->getParent()->getChildren());
        } else {
            $pageNb = count($this->entityManager->getRepository('VictoirePageBundle:BasePage')->findByParent(null));
        }

        // + 1 because position start at 1, not 0
        $page->setPosition($pageNb + 1);

        return $page;
    }