本文整理匯總了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>