protected LibraryDiscoveryParser::resolveThemeAssetPath($theme_path, $overriding_asset)
Ensures that a full path is returned for an overriding theme asset.
string $theme_path: The theme or base theme.
string $overriding_asset: The overriding library asset.
string A fully resolved theme asset path relative to the Drupal directory.
protected function resolveThemeAssetPath($theme_path, $overriding_asset) { if ($overriding_asset[0] !== '/' && !$this->isValidUri($overriding_asset)) { // The destination is not an absolute path and it's not a URI (e.g. // public://generated_js/example.js or http://example.com/js/my_js.js), so // it's relative to the theme. return '/' . $theme_path . '/' . $overriding_asset; } return $overriding_asset; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Asset!LibraryDiscoveryParser.php/function/LibraryDiscoveryParser::resolveThemeAssetPath/8.1.x