open('questionnaire/question_types/info/info'); $template->set_attribute('vote', $this); return $template; } public function createAnswer() { return $this->getMyAnswer(); } public function getUserIdsOfFilteredAnswer($answer_option) { return []; } public function getResultTemplate($only_user_ids = null) { $factory = new Flexi_TemplateFactory(realpath(__DIR__.'/../../app/views')); $template = $factory->open('questionnaire/question_types/info/info'); $template->set_attribute('vote', $this); return $template; } public function getResultArray() { return []; } /** * Return whether a given url is valid. * @return bool */ public function hasValidURL(): bool { return !empty($this->questiondata['url']) && trim($this->questiondata['url']) && filter_var($this->questiondata['url'], FILTER_VALIDATE_URL); } }