getPages(); $finished = isset($success); $configPages = array_slice($pages, 3, count($pages) - 1, true); $currentPos = array_search($wizard->getCurrentPage(), $pages, true); list($configPagesLeft, $configPagesRight) = array_chunk($configPages, count($configPages) / 2, true); $visitedPages = array_keys($wizard->getPageData()); $maxProgress = @max(array_keys(array_filter( $pages, function ($page) use ($visitedPages) { return in_array($page->getName(), $visitedPages); } ))); ?>