Fixes #125
This commit is contained in:
parent
dc5e55b4c0
commit
43b3455f75
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue