<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                官方提供了一個 系統信息(SystemInfo) 插件 看上去很簡單 其實是有用意的 **這個插件主要演示了在controller中如何調用插件數據的用法** 插件的定義中規中矩,建立config,建立了一個view 注意最后的返回值 ~~~ $this->assign('server_info', $info); return [ 'width' => 12, 'view' => $this->fetch('widget'), 'plugin' => 'SystemInfo' ]; ~~~ 插件的server_info是用在自己的模板中的 ~~~ <volist name="server_info" id="vo"> <li><em>{$key}</em> <span>{$vo}</span></li> </volist> ~~~ 最后的效果是在/admin/index/index.html的最下方 ![](https://box.kancloud.cn/67452f1de7acab57f88dd27a9845100e_943x364.png) #### **插件寫好了 如何調用它呢?** 調用此插件的方法寫在了 app\admin\controller\MainController.php的index方法中 該插件的return內容會在此處展現 ~~~ $dashboardWidgetPlugins = []; $hookResults = hook('admin_dashboard'); if (!empty($hookResults)) { foreach ($hookResults as $hookResult) { if (isset($hookResult['width']) && isset($hookResult['view']) && isset($hookResult['plugin'])) { //驗證插件返回合法性 $dashboardWidgetPlugins[$hookResult['plugin']] = $hookResult; if (!isset($dashboardWidgets[$hookResult['plugin']])) { $dashboardWidgets[$hookResult['plugin']] = ['name' => $hookResult['plugin'], 'is_system' => 0]; } } } } $this->assign('dashboard_widget_plugins', $dashboardWidgetPlugins); ~~~ 其實就是調用了插件的adminDashboard方法 返回了一個數組 包含width view plugin 在view層 themes\admin_simpleboot3\admin\main\index.html中 ~~~ <foreach name="dashboard_widgets" item="vo"> <if condition="$vo.is_system"> <div class="grid-item col-md-12" data-system="1" data-widget="{$vo.name}"> <div class="dashboard-box">{:_get_system_widget($vo.name)}</div> </div> <else/> //這里走的else <present name="dashboard_widget_plugins[$vo['name']]"> <div class="grid-item col-md-{$dashboard_widget_plugins[$vo['name']]['width']}" data-system="0" data-widget="{$vo.name}"> <div class="dashboard-box">{$dashboard_widget_plugins[$vo.name]['view']}</div> </div> </present> </if> </foreach> ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看