diff --git a/modules/backend/classes/Controller.php b/modules/backend/classes/Controller.php index e3ed18f90..8e3ed26a6 100644 --- a/modules/backend/classes/Controller.php +++ b/modules/backend/classes/Controller.php @@ -326,7 +326,7 @@ class Controller extends Extendable * Detect assets */ if ($this->hasAssetsDefined()) { - $responseContents['X_OCTOBER_ASSETS'] = $this->assets; + $responseContents['X_OCTOBER_ASSETS'] = $this->getAssetPaths(); } return Response::make()->setContent($responseContents); diff --git a/modules/system/traits/AssetMaker.php b/modules/system/traits/AssetMaker.php index 1d499d253..27e6aba32 100644 --- a/modules/system/traits/AssetMaker.php +++ b/modules/system/traits/AssetMaker.php @@ -139,6 +139,22 @@ trait AssetMaker $this->assets['rss'][] = ['path' => $rssPath, 'attributes' => $attributes]; } + /** + * Returns an array of all registered asset paths. + * @return array + */ + public function getAssetPaths() + { + $assets = []; + foreach ($this->assets as $type => $collection) { + $assets[$type] = []; + foreach ($collection as $asset) { + $assets[$type][] = $asset['path']; + } + } + return $assets; + } + /** * Locates a file based on it's definition. If the file starts with * a forward slash, it will be returned in context of the application public path,