You are here

private function UserController::getAchievementImagePath in Opigno statistics 3.x

Get the achievement image path.

Parameters

string $image: The image name.

Return value

string Path to the image in theme.

1 call to UserController::getAchievementImagePath()
UserController::buildUserInfo in src/Controller/UserController.php
Builds render array for a user info block.

File

src/Controller/UserController.php, line 209

Class

UserController
Statistics user controller.

Namespace

Drupal\opigno_statistics\Controller

Code

private function getAchievementImagePath(string $image) : string {
  $path = drupal_get_path('theme', 'aristotle') . "/src/images/design/{$image}";
  return file_exists($path) ? file_url_transform_relative(base_path() . $path) : '';
}