You are here

function CourseObjectWebform::getViewUrl in Course 3.x

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

Return value

Url

Overrides CourseObject::getViewUrl

File

modules/course_webform/src/Plugin/course/CourseObject/CourseObjectWebform.php, line 159

Class

CourseObjectWebform
Plugin annotation @CourseObject( id = "webform", label = "Webform", handlers = { "fulfillment" = "\Drupal\course_webform\Plugin\course\CourseObject\CourseObjectWebformFulfillment" } )

Namespace

Drupal\course_webform\Plugin\course\CourseObject

Code

function getViewUrl() {
  $url = Url::fromRoute('entity.webform.canonical', [
    'webform' => $this
      ->getInstanceId(),
  ]);
  return $url;
}