public function getAction()
    {
        $id = $this->getPageId();
        if ($id !== null) {
            $result = $this->pageList->getPage($id)->getJSON();
        } else {
            $result = array();
            foreach ($this->pageList->getPages() as $pageName) {
                $result[] = $this->pageList->getPage($pageName)->getJSON();
            }
        }
        $this->environment->sendJSONResult($result);
    }