You are here

function QuizQuestionController::checkAccess in Quiz 8.6

Same name and namespace in other branches
  1. 8.5 src/Controller/QuizQuestionController.php \Drupal\quiz\Controller\QuizQuestionController::checkAccess()
  2. 6.x src/Controller/QuizQuestionController.php \Drupal\quiz\Controller\QuizQuestionController::checkAccess()

Translate the numeric question index to a question result answer, and run the "take" entity access check on it.

Parameters

Quiz $quiz:

int $question_number:

1 string reference to 'QuizQuestionController::checkAccess'
quiz.routing.yml in ./quiz.routing.yml
quiz.routing.yml

File

src/Controller/QuizQuestionController.php, line 186

Class

QuizQuestionController

Namespace

Drupal\quiz\Controller

Code

function checkAccess(Quiz $quiz, $question_number) {
  return $this
    ->checkEntityAccess('take', $quiz, $question_number);
}