public function AssetCache::getSourcePath

Returns the relative path for the source asset.

This value can be combined with the asset's source root (if both are non-null) to get something compatible with file_get_contents().

For example:

  • 'js/main.js'
  • 'main.js'
  • null

Return value

string|null The source asset path

Overrides AssetInterface::getSourcePath

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCache.php, line 90

Class

AssetCache
Caches an asset to avoid the cost of loading and dumping.

Namespace

Assetic\Asset

Code

public function getSourcePath() {
  return $this->asset
    ->getSourcePath();
}