public function AssetInterface::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

4 methods override AssetInterface::getSourcePath()
AssetCache::getSourcePath in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCache.php
Returns the relative path for the source asset.
AssetCollection::getSourcePath in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php
Returns the relative path for the source asset.
AssetReference::getSourcePath in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetReference.php
Returns the relative path for the source asset.
BaseAsset::getSourcePath in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/BaseAsset.php
Returns the relative path for the source asset.

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetInterface.php, line 113

Class

AssetInterface
An asset has a mutable URL and content and can be loaded and dumped.

Namespace

Assetic\Asset

Code

public function getSourcePath();