/** * {@inheritdoc} */ public function __get($property) { switch ($property) { case 'template': case 'data': case 'withLayout': return $this->{$property}; } return parent::__get($property); }