You are here

function _quiz_get_quiz_name in Quiz 8.5

Same name and namespace in other branches
  1. 8.6 quiz.module \_quiz_get_quiz_name()
  2. 8.4 quiz.module \_quiz_get_quiz_name()
  3. 5.2 quiz.module \_quiz_get_quiz_name()
  4. 5 quiz.module \_quiz_get_quiz_name()
  5. 6.6 quiz.module \_quiz_get_quiz_name()
  6. 6.2 quiz.module \_quiz_get_quiz_name()
  7. 6.3 quiz.module \_quiz_get_quiz_name()
  8. 6.4 quiz.module \_quiz_get_quiz_name()
  9. 6.5 quiz.module \_quiz_get_quiz_name()
  10. 7.6 quiz.module \_quiz_get_quiz_name()
  11. 7 quiz.module \_quiz_get_quiz_name()
  12. 7.4 quiz.module \_quiz_get_quiz_name()
  13. 7.5 quiz.module \_quiz_get_quiz_name()

Get the quiz name variable and set it as a constant so we don't have to keep calling it in every function.

Return value

string Quiz name variable.

22 calls to _quiz_get_quiz_name()
MultichoiceQuestion::getCreationForm in question_types/quiz_multichoice/src/Plugin/quiz/QuizQuestion/MultichoiceQuestion.php
Implementation of getCreationForm().
QuizAdminForm::buildForm in src/Form/QuizAdminForm.php
This builds the main settings form for the quiz module.
QuizBuildOnLastTest::testBuildOnLastAttempt in tests/src/Functional/QuizBuildOnLastTest.php
Test the build on last attempt functionality.
QuizController::take in src/Controller/QuizController.php
Take the quiz.
QuizQuestionEntityTrait::getNodeForm in src/Entity/QuizQuestionEntityTrait.php
Returns a node form to quiz_question_form.

... See full list

File

./quiz.module, line 624
Contains quiz.module

Code

function _quiz_get_quiz_name() {
  $quiz = Drupal::entityTypeManager()
    ->getDefinition('quiz');
  return $quiz
    ->getLabel();
}