本文整理汇总了PHP中Assets::inline_js方法的典型用法代码示例。如果您正苦于以下问题:PHP Assets::inline_js方法的具体用法?PHP Assets::inline_js怎么用?PHP Assets::inline_js使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Assets
的用法示例。
在下文中一共展示了Assets::inline_js方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
if (ENVIRONMENT == 'development') {
?>
<p style="float: right; margin-right: 80px;">Page rendered in {elapsed_time} seconds, using {memory_usage}.</p>
<?php
}
?>
<p>Powered by <a href="http://cibonfire.com" target="_blank">Bonfire <?php
echo BONFIRE_VERSION;
?>
</a></p>
</div>
<div id="debug"></div>
<script>
head.js(<?php
echo Assets::external_js(null, true);
?>
);
head.js(<?php
echo Assets::module_js(true);
?>
);
</script>
<?php
echo Assets::inline_js();
?>
</body>
</html>
示例2: test_inline_js_includes_text
public function test_inline_js_includes_text()
{
Assets::add_js('abcdef', 'inline');
$r = Assets::inline_js();
$this->assertTrue(strpos($r, 'abcdef') !== false);
}
示例3: site_url
<a href="<?php echo site_url('admin/settings') ?>" <?php echo check_class('settings') ?> id="tb_settings" title="Settings">Settings</a>
<?php endif; ?>
<?php if (has_permission('Site.Developer.View')) :?>
<a href="<?php echo site_url('admin/developer') ?>" <?php echo check_class('developer') ?> id="tb_developer" title="Developer Tools">Developer Tools</a>
<?php endif; ?>
</div> <!-- /toolbar-left -->
</div>
<?php echo modules::run('subnav/subnav/index', $this->uri->segment(2)); ?>
<div id="nav-bar">
<?php if (isset($toolbar_title)) : ?>
<h1><?php echo $toolbar_title ?></h1>
<?php endif; ?>
<?php Template::block('sub_nav', ''); ?>
</div>
<div class="content-main <?php echo isset(Template::$blocks['nav_bottom']) ? 'with-bottom-bar' : '' ?>">
<?php echo Template::yield(); ?>
</div>
<?php Template::block('nav_bottom', ''); ?>
<script>
head.js(<?php echo Assets::external_js(null, true) ?>);
</script>
<?php echo Assets::inline_js(); ?>
</body>
</html>