You are here

public function CourseObjectPoll::getViewUrl in Course 3.x

Get the URL to view this course object, if any.

Return value

Url

Overrides CourseObject::getViewUrl

1 call to CourseObjectPoll::getViewUrl()
CourseObjectPoll::getTakeUrl in modules/course_poll/src/Plugin/course/CourseObject/CourseObjectPoll.php
Get the URL to take this course object, if any.

File

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

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 getViewUrl() {
  return Url::fromRoute('entity.poll.canonical', [
    'poll' => $this
      ->getInstanceId(),
  ]);
}