public function render()
    {
        if(!$this->template) {
            throw new \RuntimeException(sprintf("No template for element '%s' defined.", $this->getName()));
        }

        $this->html = $this->template->assign('element', $this)->display();
        return $this->html;
    }