You are here

public function ContentTypeCourse::getViewContentUrl in Opigno course 3.x

Same name and namespace in other branches
  1. 8 src/Plugin/OpignoGroupManagerContentType/ContentTypeCourse.php \Drupal\opigno_course\Plugin\OpignoGroupManagerContentType\ContentTypeCourse::getViewContentUrl()

Get the URL object of the main view page of a specific entity.

Parameters

int $entity_id: The entity ID.

Return value

\Drupal\Core\Url The tool entity URL.

Overrides ContentTypeInterface::getViewContentUrl

File

src/Plugin/OpignoGroupManagerContentType/ContentTypeCourse.php, line 40

Class

ContentTypeCourse
Class ContentTypeCourse.

Namespace

Drupal\opigno_course\Plugin\OpignoGroupManagerContentType

Code

public function getViewContentUrl($entity_id) {
  return Url::fromRoute('entity.group.canonical', [
    'group' => $entity_id,
  ]);
}