mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 13:24:41 +03:00
Rename "additionalJs" helper to "jsAssets"
This commit is contained in:
parent
3772274ca3
commit
5b09b3e52c
@ -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',
|
||||
|
@ -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
|
@ -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"><!--
|
||||
|
@ -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"><!--
|
||||
|
Loading…
Reference in New Issue
Block a user