/** * Get requested template * @return object */ public function getTemplate() { if (!$this->template) { $this->template = \ThemeTemplate::instance_factory($this->getFirstMatchedUserData()->template_id); } return $this->template; }