getPages(); $finished = isset($success); $configPages = array_slice($pages, 3, count($pages) - 4, true); $currentPos = array_search($wizard->getCurrentPage(), $pages, true); list($configPagesLeft, $configPagesRight) = array_chunk($configPages, (int)(count($configPages) / 2), true); $setupStyle = (new Style()) ->setSelector('.setup-header > .progress-bar') ->setNonce(Csp::getStyleNonce()); $visitedPages = array_keys($wizard->getPageData()); $maxProgress = max(array_merge([0], array_keys(array_filter( $pages, function ($page) use ($visitedPages) { return in_array($page->getName(), $visitedPages); } )))); $setupStyle->add( '.width-percent-10', ['width' => '10%'] )->add( '.width-percent-60', ['width' => '60%'] ); ?>