You are here

public function CourseObjectPoll::getReports in Course 3.x

Let the course object provide its own reports.

Return value

array An array indexed by report key, containing 'title' which is the menu link in the course object reports.

Overrides CourseObject::getReports

File

modules/course_poll/src/Plugin/course/CourseObject/CourseObjectPoll.php, line 76

Class

CourseObjectPoll
Plugin annotation @CourseObject( id = "poll", label = "Poll", handlers = { "fulfillment" = "\Drupal\course_poll\Plugin\course\CourseObject\CourseObjectPollFulfillment" } )

Namespace

Drupal\course_poll\Plugin\course\CourseObject

Code

public function getReports() {
  $reports = parent::getReports();
  $reports += array(
    'results' => array(
      'title' => 'Results',
    ),
    'all' => array(
      'title' => 'List votes',
    ),
  );
  return $reports;
}