You are here

public static function QuizUtil::getQuizName in Quiz 6.x

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.

15 calls to QuizUtil::getQuizName()
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.
QuizQuestionsForm::buildForm in src/Form/QuizQuestionsForm.php
Handles "manage questions" tab.
QuizQuestionsForm::submitForm in src/Form/QuizQuestionsForm.php
Form submission handler.

... See full list

File

src/Util/QuizUtil.php, line 22

Class

QuizUtil
Utility functions that don't belong anywhere else.

Namespace

Drupal\quiz\Util

Code

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