You are here

protected function QuizQuestion::getFormat in Quiz 8.4

Utility function that returns the format of the node body

1 call to QuizQuestion::getFormat()
LongAnswerQuestion::getNodeView in question_types/long_answer/lib/Drupal/long_answer/LongAnswerQuestion.php
Implementation of getNodeView

File

question_types/quiz_question/lib/Drupal/quiz_question/QuizQuestion.php, line 661
Classes used in the Quiz Question module.

Class

QuizQuestion
A base implementation of a quiz_question, adding a layer of abstraction between the node API, quiz API and the question types.

Namespace

Drupal\quiz_question

Code

protected function getFormat() {
  $body = field_get_items($this->node, 'body');
  return $body ? $body[0]['format'] : NULL;
}