You are here

public function ContentTypeCourse::getDefaultCourseImageUrl in Opigno course 8

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

Returns default image url.

4 calls to ContentTypeCourse::getDefaultCourseImageUrl()
ContentTypeCourse::getAllContents in src/Plugin/OpignoGroupManagerContentType/ContentTypeCourse.php
Get all the entities in an array of LearningPathContent.
ContentTypeCourse::getAvailableContents in src/Plugin/OpignoGroupManagerContentType/ContentTypeCourse.php
Get all the published entities in an array of LearningPathContent.
ContentTypeCourse::getContent in src/Plugin/OpignoGroupManagerContentType/ContentTypeCourse.php
Get the entity as a LearningPathContent.
ContentTypeCourse::getContentFromRequest in src/Plugin/OpignoGroupManagerContentType/ContentTypeCourse.php
Try to get the content from a Request object.

File

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

Class

ContentTypeCourse
Class ContentTypeCourse.

Namespace

Drupal\opigno_course\Plugin\OpignoGroupManagerContentType

Code

public function getDefaultCourseImageUrl() {
  $request = \Drupal::request();
  $path = \Drupal::service('module_handler')
    ->getModule('opigno_course')
    ->getPath();
  return $request
    ->getBasePath() . '/' . $path . '/img/img_course.svg';
}