private function MultichoiceQuestion::checkMarkup in Quiz 8.5
Same name and namespace in other branches
- 8.6 question_types/quiz_multichoice/src/Plugin/quiz/QuizQuestion/MultichoiceQuestion.php \Drupal\quiz_multichoice\Plugin\quiz\QuizQuestion\MultichoiceQuestion::checkMarkup()
Run check_markup() on the field of the specified choice alternative.
Parameters
string $alternativeIndex: The index of the alternative in the alternatives array.
string $field: The name of the field we want to check markup on.
bool $check_user_access: Whether or not to check for user access to the filter we're trying to apply.
Return value
string The filtered text.
1 call to MultichoiceQuestion::checkMarkup()
- MultichoiceQuestion::validateNode in question_types/
quiz_multichoice/ src/ Plugin/ quiz/ QuizQuestion/ MultichoiceQuestion.php - Implementation of validateNode().
File
- question_types/
quiz_multichoice/ src/ Plugin/ quiz/ QuizQuestion/ MultichoiceQuestion.php, line 119
Class
- MultichoiceQuestion
- @QuizQuestion ( id = "multichoice", label = Plugin annotation @Translation("Multiple choice question"), handlers = { "response" = "\Drupal\quiz_multichoice\Plugin\quiz\QuizQuestion\MultichoiceResponse" } )
Namespace
Drupal\quiz_multichoice\Plugin\quiz\QuizQuestionCode
private function checkMarkup($alternativeIndex, $field, $check_user_access = FALSE) {
$alternative = $this->node->alternatives[$alternativeIndex];
return check_markup($alternative[$field]['value'], $alternative[$field]['format']);
}