private function orderPages(array $pages, $locale)
    {
        $documentManager = $this->getDocumentManager();

        for ($i = 0; $i < count($pages); ++$i) {
            $document = $documentManager->find($pages[$i], $locale);
            $documentManager->reorder($document, null);
        }
    }