/** * Render block HTML * * @return string */ protected function _toHtml() { foreach ($this->getChildNames() as $childName) { $childBlock = $this->getLayout()->getBlock($childName); if ($childBlock) { $wrapper = $this->blockWrapperFactory->create(['block' => $childBlock, 'data' => ['name' => 'block_' . $childName]]); $this->component->addComponent('block_' . $childName, $wrapper); } } $result = $this->component->render(); return (string) $result; }
/** * Render element * * @return string */ public function render() { return $this->element->render($this->data); }