protected LibraryDiscoveryParser::resolveThemeAssetPath($theme_path, $overriding_asset)
Ensures that a full path is returned for an overriding theme asset.
Parameters
string $theme_path: The theme or base theme.
string $overriding_asset: The overriding library asset.
Return value
string A fully resolved theme asset path relative to the Drupal directory.
File
- core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php, line 453
Class
- LibraryDiscoveryParser
- Parses library files to get extension data.
Namespace
Drupal\Core\Asset
Code
1 2 3 4 5 6 7 8 9 | 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. // it's relative to the theme. return '/' . $theme_path . '/' . $overriding_asset ; } return $overriding_asset ; } |
Please login to continue.