function CourseObjectQuiz::getOptionsSummary in Course 8.3
Same name and namespace in other branches
- 8.2 modules/course_quiz/src/Plugin/course/CourseObject/CourseObjectQuiz.php \Drupal\course_quiz\Plugin\course\CourseObject\CourseObjectQuiz::getOptionsSummary()
- 3.x 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 177
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 = Drupal\Core\Link::createFromRoute('Edit questions', "quiz.questions", [
'quiz' => $this
->getInstanceId(),
]);
$summary['questions'] = $link
->toString();
}
return $summary;
}