Skip to content

Commit

Permalink
Don't reference asset view helper in moduleAsset
Browse files Browse the repository at this point in the history
  • Loading branch information
xemlock committed Mar 10, 2019
1 parent 00f4df3 commit 5dc9b87
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion library/Maniple/View/Helper/ModuleAsset.php
Expand Up @@ -5,9 +5,19 @@
*/
class Maniple_View_Helper_ModuleAsset extends Zend_View_Helper_Abstract
{
/**
* @return Maniple_AssetMananger_Service
*/
protected function _getAssetManager()
{
/** @var Maniple_AssetMananger_Service $assetManager */
$assetManager = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('Maniple.AssetManager');
return $assetManager;
}

public function moduleAsset($path, $moduleName = null)
{
return $this->view->asset($path, $moduleName);
return $this->_getAssetManager()->getAssetUrl($path, $moduleName);
}

public function addManifest(array $manifest, $moduleName)
Expand Down

0 comments on commit 5dc9b87

Please sign in to comment.