/** * Get the evaluated contents of the object. * * @return string */ public function render() { if ($this->cacheKey === null) { throw new InvalidArgumentException('A cache key must be specified'); } if ($this->updatedAt === null) { throw new InvalidArgumentException('A updated at timestamp must be specified'); } if ($this->template == null) { throw new InvalidArgumentException('A valid template does not exist.'); } if ($this->render == null) { $this->render = $this->template->render($this->data); } return $this->render; }
public function display(array $context, array $blocks = []) { $attr = Helper::getAttributes($this->getTemplateName()); parent::display(array_merge($context, $attr), $blocks); }