當前位置: 首頁>>代碼示例>>PHP>>正文


PHP runner::stack_js方法代碼示例

本文整理匯總了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;
 }
開發者ID:RetroscopeCreative,項目名稱:RouterunnerCMS,代碼行數:20,代碼來源:BaseRunner.php

示例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>
開發者ID:RetroscopeCreative,項目名稱:RouterunnerCMS,代碼行數:15,代碼來源:loggedout.view.php

示例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>
開發者ID:RetroscopeCreative,項目名稱:RouterunnerCMS,代碼行數:15,代碼來源:logout.view.php


注:本文中的runner::stack_js方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。