/** * @param SectionInterface $section * @return void */ public function visitSection(SectionInterface $section) { $this->visitChild($section->getWritableBearer()); }
/** * 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()]); }