Ejemplo n.º 1
0
 /**
  * @return IRenderable
  */
 private function _buildBreadcrumb()
 {
     $breadcrumb = new HtmlElement("ul", ["class" => "breadcrumb"]);
     $breadcrumb->nestElement("li", [], "Steps")->nestElement("li", [], new HtmlElement("span", ["class" => "divider"], "»"));
     foreach ($this->_steps->getArrayCopy() as $stepKey => $step) {
         $active = $stepKey === $this->_steps->key() ? "active" : "";
         /**
          * @var IWizardStep $step
          */
         $content = sprintf("%d: %s%s", $stepKey + 1, $step->getName(), new HtmlElement("span", ["class" => "divider"], ""));
         $breadcrumb->nestElement("li", ["class" => $active], $content);
     }
     return $breadcrumb;
 }
Ejemplo n.º 2
0
 /**
  * If we go directly to the wizard page we redirect to the first step.
  *
  * @return Redirect
  */
 public function actionGoToFirstStep()
 {
     $uri = sprintf("%s%s", $this->baseUri(), $this->_wizardIterator->offsetGet(0)->getBaseUri());
     return \Cubex\Facade\Redirect::to($uri);
 }