/** * Returns the next page of the currently selected one or NULL if there is no next page * * @return null|Page * @api */ public function getNextPage() { $nextPageIndex = $this->currentPage->getIndex() + 1; if ($this->formDefinition->hasPageWithIndex($nextPageIndex)) { return $this->formDefinition->getPageByIndex($nextPageIndex); } return null; }