You are here

protected function PrintableCssInclude::getThemePath in Printer and PDF versions for Drupal 8+ 2.x

Same name and namespace in other branches
  1. 8 src/PrintableCssInclude.php \Drupal\printable\PrintableCssInclude::getThemePath()

Get the path to a theme.

@todo replace this with an injectable version of drupal_get_path() when/if it lands.

Parameters

string $theme: The machine name of the theme to get the path for.

Return value

string The path to the given theme.

1 call to PrintableCssInclude::getThemePath()
PrintableCssInclude::getCssIncludePath in src/PrintableCssInclude.php
Get the configured CSS include path for printable pages.

File

src/PrintableCssInclude.php, line 92

Class

PrintableCssInclude
Helper class for the printable module.

Namespace

Drupal\printable

Code

protected function getThemePath($theme) {
  $info = $this->themeHandler
    ->listInfo();
  $path = '';
  if (isset($info[$theme])) {
    $path = $info[$theme]
      ->getPath();
  }
  return $path;
}