You are here

public function CourseObjectNode::getEditUrl in Course 3.x

Same name and namespace in other branches
  1. 8.3 modules/course_content/src/Course/Object/CourseObjectNode.php \Drupal\course_content\Course\Object\CourseObjectNode::getEditUrl()
  2. 8.2 modules/course_content/src/Course/Object/CourseObjectNode.php \Drupal\course_content\Course\Object\CourseObjectNode::getEditUrl()

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

Return value

Url

Overrides CourseObject::getEditUrl

1 call to CourseObjectNode::getEditUrl()
CourseObjectNode::getOptionsSummary in modules/course_content/src/Course/Object/CourseObjectNode.php
Make the "Edit instance" link use a dialog.

File

modules/course_content/src/Course/Object/CourseObjectNode.php, line 102

Class

CourseObjectNode
A course object that uses a node as a base.

Namespace

Drupal\course_content\Course\Object

Code

public function getEditUrl() {
  if ($this
    ->getNode()) {
    return Url::fromRoute('entity.node.edit_form', [
      'node' => $this
        ->getNode()
        ->id(),
    ]);
  }
}