$answers has_many QuestionnaireAnswer * @property Questionnaire $questionnaire belongs_to Questionnaire */ class BlankLine extends QuestionnaireQuestion implements QuestionType { public static function isDesignElement() { return true; } public static function getIcon(bool $active = false) : Icon { return Icon::create(static::getIconShape(), $active ? 'clickable' : 'info'); } /** * Returns the shape of the icon of this QuestionType * @return string */ public static function getIconShape() { // TODO we need an icon return 'bullet-dot'; } public static function getName() { return _('Leerzeile'); } public function getDisplayTemplate() { $factory = new Flexi\Factory(realpath(__DIR__.'/../../app/views')); $template = $factory->open('questionnaire/question_types/designelements/blank_line'); $template->set_attribute('vote', $this); return $template; } static public function getEditingComponent() { return ['BlankLineEdit', '']; } static public function getAnsweringComponent() { return ['BlankLineAnswer', '']; } public function beforeStoringQuestiondata($questiondata) { $questiondata['description'] = \Studip\Markup::markAsHtml( \Studip\Markup::purifyHtml($questiondata['description']) ); return $questiondata; } public function createAnswer() { return $this->getMyAnswer(); } public function getUserIdsOfFilteredAnswer($answer_option) { return []; } public function getResultTemplate($only_user_ids = null) { $factory = new Flexi\Factory(realpath(__DIR__.'/../../app/views')); $template = $factory->open('questionnaire/question_types/designelements/blank_line'); $template->set_attribute('vote', $this); return $template; } public function getResultArray() { return []; } }