本文整理汇总了PHP中runner::stack_js方法的典型用法代码示例。如果您正苦于以下问题:PHP runner::stack_js方法的具体用法?PHP runner::stack_js怎么用?PHP runner::stack_js使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类runner
的用法示例。
在下文中一共展示了runner::stack_js方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: backend_model_wrapper
private function backend_model_wrapper($html)
{
$html = $this->backend_wrapper($html, 'model');
if ($this->backend_id) {
$script = '';
foreach ($this->backend_id as $backend_id) {
$script .= 'routerunner_attach("' . $backend_id . '");' . PHP_EOL;
}
\runner::stack_js($script);
/*
$html .= <<<HTML
<script id="script_{$backend_id}">{$script}</script>
HTML;
*/
} else {
// todo: throw exception
}
return $html;
}
示例2:
<?php
$debug = 1;
\user::logout();
\runner::stack_js('setTimeout(function() { window.location.href = "' . \runner::config('BASE') . '"; }, 2000);');
?>
<body class="page-md page-header-top-fixed">
<div class="backend-wrapper">
<!-- BEGIN CONTAINER -->
<div class="page-container row container-fluid container-margin">
<h1>You've been successfully logged out!</h1>
</div>
</div>
</body>
示例3:
<?php
$debug = 1;
\user::logout();
\runner::stack_js('setTimeout(function() { window.location.href = "' . \runner::config('BASE') . 'admin/user/loggedout"; }, 100);');
?>
<body class="page-md page-header-top-fixed">
<div class="backend-wrapper">
<!-- BEGIN CONTAINER -->
<div class="page-container row container-fluid container-margin">
<h1>You've been successfully logged out!</h1>
</div>
</div>
</body>