Ejemplo n.º 1
0
 /**
  * @param SectionInterface $section
  * @return void
  */
 public function visitSection(SectionInterface $section)
 {
     $this->visitChild($section->getWritableBearer());
 }
Ejemplo n.º 2
0
 /**
  * Render $section into html.
  *
  * This method is generally called via double-dispatch, as provided by Visitor\VisitableTrait.
  *
  * @param SectionInterface $section
  * @return string
  */
 public function visitSection(SectionInterface $section)
 {
     $template = 'section/' . $section->getType() . '.twig';
     return $this->loadTemplate($template)->render(["id" => $section->getId(), "classes" => $section->getClasses(), "data" => $section->getData(), "writables" => $section->getWritables()]);
 }