summaryrefslogtreecommitdiff
path: root/framework/Web/Services
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/Services')
-rw-r--r--framework/Web/Services/TPageService.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php
index 65549159..b07527c6 100644
--- a/framework/Web/Services/TPageService.php
+++ b/framework/Web/Services/TPageService.php
@@ -464,6 +464,19 @@ class TPageService extends TService
{
return $this->getRequest()->constructUrl($this->_id,$pagePath,$getParams,$encodeAmpersand);
}
+
+ /**
+ * Publishes a private asset and returns its URL.
+ * This method will publish a private asset (file or directory)
+ * and returns the URL to the asset. Note, if the asset refers to
+ * a directory, all contents under that directory will be published.
+ * @param string path of the asset that is either absolute or relative to the directory containing the current running script.
+ * @return string URL to the asset path.
+ */
+ public function getAsset($path)
+ {
+ return $this->getAssetManager()->publishFilePath($path);
+ }
}