You are here

public function CourseObject::getUrl in Course 3.x

Same name and namespace in other branches
  1. 8.3 src/Entity/CourseObject.php \Drupal\course\Entity\CourseObject::getUrl()
  2. 8.2 src/Entity/CourseObject.php \Drupal\course\Entity\CourseObject::getUrl()

Return the URL to the course object router.

Return value

Url

File

src/Entity/CourseObject.php, line 580

Class

CourseObject
Parent abstract base class of all course objects.

Namespace

Drupal\course\Entity

Code

public function getUrl() {
  return Url::fromRoute('course.object', [
    'course' => $this
      ->getCourse()
      ->id(),
    'course_object' => $this
      ->id(),
  ]);
}