function CourseObjectQuiz::getOptionsSummary in Course 3.x
Same name and namespace in other branches
- 8.3 modules/course_quiz/src/Plugin/course/CourseObject/CourseObjectQuiz.php \Drupal\course_quiz\Plugin\course\CourseObject\CourseObjectQuiz::getOptionsSummary()
- 8.2 modules/course_quiz/src/Plugin/course/CourseObject/CourseObjectQuiz.php \Drupal\course_quiz\Plugin\course\CourseObject\CourseObjectQuiz::getOptionsSummary()
Get core options summary.
Return value
array An associative array of summary keys and values.
Overrides CourseObject::getOptionsSummary
File
- modules/
course_quiz/ src/ Plugin/ course/ CourseObject/ CourseObjectQuiz.php, line 192
Class
- CourseObjectQuiz
- Plugin annotation @CourseObject( id = "quiz", label = "Quiz", handlers = { "fulfillment" = "\Drupal\course_quiz\Plugin\course\CourseObject\CourseObjectQuizFulfillment" } )
Namespace
Drupal\course_quiz\Plugin\course\CourseObjectCode
function getOptionsSummary() {
$summary = parent::getOptionsSummary();
if ($this
->getInstanceId()) {
$link = Link::createFromRoute('Edit questions', "quiz.questions", [
'quiz' => $this
->getInstanceId(),
]);
$summary['questions'] = $link
->toString();
}
return $summary;
}