You are here

public function LibrariesInfo::librariesGetPath in X Autoload 7.5

Parameters

string $name:

string|bool $base_path:

Return value

string|bool

See also

libraries_get_path()

File

tests/src/VirtualDrupal/LibrariesInfo.php, line 131

Class

LibrariesInfo

Namespace

Drupal\xautoload\Tests\VirtualDrupal

Code

public function librariesGetPath($name, $base_path = FALSE) {
  $libraries =& $this->drupalStatic
    ->get('libraries_get_path');
  if (!isset($libraries)) {
    $libraries = $this
      ->librariesGetLibraries();
  }
  $path = $base_path ? base_path() : '';
  if (!isset($libraries[$name])) {
    return FALSE;
  }
  else {
    $path .= $libraries[$name];
  }
  return $path;
}