src/Builder/VariableFormBuilder.php
protected function getPages()
    {
        if (!$this->pages)
        {
            $items = [0 => 'Žádný odkaz'];

            $roots = $this->pageRepository->findAllJoinUrl();

            foreach ($roots as $root)
            {
                $lang = $root->getPageUrl()->getLang();
                $tree = $this->pageRepository->findAllByLevelNameByLangAsTree($lang, TRUE);
                $pages = $this->pageRepository->findAllByLevelNameByLang($tree, TRUE);

                foreach ($pages as $page)
                {
                    $items[$page->getId()] = str_repeat('––', $page->getLevel() - 2) . ' ' . $page->getName();
                }
            }

            $this->pages = $items;
        }

        return $this->pages;
    }
protected function getPages()
    {
        if (!$this->pages)
        {
            $items = [0 => 'Žádný odkaz'];

            $roots = $this->pageRepository->findAllJoinUrl();

            foreach ($roots as $root)
            {
                $lang = $root->getPageUrl()->getLang();
                $tree = $this->pageRepository->findAllByLevelNameByLangAsTree($lang, TRUE);
                $pages = $this->pageRepository->findAllByLevelNameByLang($tree, TRUE);

                foreach ($pages as $page)
                {
                    $items[$page->getId()] = str_repeat('––', $page->getLevel() - 2) . ' ' . $page->getName();
                }
            }

            $this->pages = $items;
        }

        return $this->pages;
    }
TODO: load in Form Control
Cashed SQL
@return array
@throws \Propel\Runtime\Exception\PropelException