Rename "additionalJs" helper to "jsAssets"

This commit is contained in:
Dmitriy Simushev 2014-10-09 14:31:26 +00:00
parent 3772274ca3
commit 5b09b3e52c
4 changed files with 9 additions and 9 deletions

View File

@ -26,10 +26,10 @@ use Mibew\Authentication\AuthenticationManagerAwareInterface;
use Mibew\Authentication\AuthenticationManagerInterface;
use Mibew\Cache\CacheAwareInterface;
use Mibew\Handlebars\HandlebarsAwareInterface;
use Mibew\Handlebars\Helper\AdditionalJsHelper;
use Mibew\Handlebars\Helper\AssetHelper;
use Mibew\Handlebars\Helper\CsrfProtectedRouteHelper;
use Mibew\Handlebars\Helper\CssAssetsHelper;
use Mibew\Handlebars\Helper\JsAssetsHelper;
use Mibew\Handlebars\Helper\RouteHelper;
use Mibew\Routing\RouterAwareInterface;
use Mibew\Routing\RouterInterface;
@ -129,8 +129,8 @@ abstract class AbstractController implements
if ($handlebars->hasHelper('asset')) {
$handlebars->getHelper('asset')->setAssetUrlGenerator($manager->getUrlGenerator());
}
if ($handlebars->hasHelper('additionalJs')) {
$handlebars->getHelper('additionalJs')->setAssetManager($manager);
if ($handlebars->hasHelper('jsAssets')) {
$handlebars->getHelper('jsAssets')->setAssetManager($manager);
}
if ($handlebars->hasHelper('cssAssets')) {
$handlebars->getHelper('cssAssets')->setAssetManager($manager);
@ -292,8 +292,8 @@ abstract class AbstractController implements
)
);
$style->getHandlebars()->addHelper(
'additionalJs',
new AdditionalJsHelper($this->getAssetManager())
'jsAssets',
new JsAssetsHelper($this->getAssetManager())
);
$style->getHandlebars()->addHelper(
'cssAssets',

View File

@ -32,10 +32,10 @@ use Mibew\Asset\AssetManagerInterface;
*
* Example of usage:
* <code>
* {{additionalJs}}
* {{jsAssets}}
* </code>
*/
class AdditionalJsHelper implements HelperInterface, AssetManagerAwareInterface
class JsAssetsHelper implements HelperInterface, AssetManagerAwareInterface
{
/**
* @var AssetManagerInterface|null

View File

@ -28,7 +28,7 @@
<!-- Add style scripts -->
<script type="text/javascript" src="{{asset "@CurrentStyle/js/compiled/scripts.js"}}"></script>
{{additionalJs}}
{{jsAssets}}
<!-- Run application -->
<script type="text/javascript"><!--

View File

@ -10,7 +10,7 @@
<script type="text/javascript" src="{{asset "js/compiled/users_app.js"}}"></script>
<!-- Plugins JavaScript files -->
{{additionalJs}}
{{jsAssets}}
<script type="text/javascript"><!--