Ejemplo n.º 1
0
 /**
  * Renders menu
  *
  * @param ItemInterface $item
  * @param array         $options
  *
  * @return string
  */
 public function render(ItemInterface $item, array $options = array())
 {
     $options = array_merge($this->defaultOptions, $options);
     if ($options['clear_matcher']) {
         $this->matcher->clear();
     }
     //render html
     $html = $this->engine->render($options['template'], array('item' => $item, 'options' => $options, 'matcher' => $this->matcher));
     return $html;
 }
Ejemplo n.º 2
0
 /**
  * Renders menu
  *
  * @param ItemInterface $item
  * @param array         $options
  *
  * @return string
  */
 public function render(ItemInterface $item, array $options = array())
 {
     $options = array_merge($this->defaultOptions, $options);
     if ($options['clear_matcher']) {
         $this->matcher->clear();
     }
     $manipulator = new MenuManipulator();
     if ($options["menu"] == "admin") {
         //render html
         $html = $this->engine->render("MauticCoreBundle:Menu:admin.html.php", array("item" => $item, "options" => $options, "matcher" => $this->matcher));
     } else {
         //render html
         $html = $this->engine->render("MauticCoreBundle:Menu:main.html.php", array("item" => $item, "options" => $options, "matcher" => $this->matcher));
     }
     return $html;
 }