You are here

public function ContentTypeModule::getDefaultModuleImageUrl in Opigno module 8

Same name and namespace in other branches
  1. 3.x src/Plugin/OpignoGroupManagerContentType/ContentTypeModule.php \Drupal\opigno_module\Plugin\OpignoGroupManagerContentType\ContentTypeModule::getDefaultModuleImageUrl()

Returns module default image url.

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

File

src/Plugin/OpignoGroupManagerContentType/ContentTypeModule.php, line 315

Class

ContentTypeModule
Class ContentTypeModule.

Namespace

Drupal\opigno_module\Plugin\OpignoGroupManagerContentType

Code

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