当前位置: 首页>>代码示例>>PHP>>正文


PHP vmJsApi::keepAlive方法代码示例

本文整理汇总了PHP中vmJsApi::keepAlive方法的典型用法代码示例。如果您正苦于以下问题:PHP vmJsApi::keepAlive方法的具体用法?PHP vmJsApi::keepAlive怎么用?PHP vmJsApi::keepAlive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vmJsApi的用法示例。


在下文中一共展示了vmJsApi::keepAlive方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 public function display($tpl = null)
 {
     $view = vRequest::getCmd('view', vRequest::getCmd('controller', 'virtuemart'));
     if ($view == 'virtuemart' or $view == 'about' or $this->canDo->get('core.admin') or $this->canDo->get('vm.' . $view)) {
         //Super administrators always have access
         if (JFactory::getApplication()->isSite()) {
             $unoverridable = array('category', 'manufacturer', 'user');
             //This views have the same name and must not be overridable
             if (!in_array($view, $unoverridable)) {
                 if (!class_exists('VmTemplate')) {
                     require VMPATH_SITE . DS . 'helpers' . DS . 'vmtemplate.php';
                 }
                 $template = VmTemplate::getDefaultTemplate();
                 $this->addTemplatePath(VMPATH_ROOT . DS . 'templates' . DS . $template['template'] . DS . 'html' . DS . 'com_virtuemart' . DS . $this->_name);
             }
         }
         $result = $this->loadTemplate($tpl);
         if ($result instanceof Exception) {
             return $result;
         }
         echo $result;
         if ($this->writeJs) {
             vmJsApi::keepAlive();
             echo vmJsApi::writeJS();
         }
         return true;
     } else {
         JFactory::getApplication()->redirect('index.php?option=com_virtuemart', vmText::_('JERROR_ALERTNOAUTHOR'), 'error');
     }
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:30,代码来源:vmviewadmin.php

示例2: withKeepAlive

 public function withKeepAlive()
 {
     if (!class_exists('VirtueMartCart')) {
         require VMPATH_SITE . DS . 'helpers' . DS . 'cart.php';
     }
     $cart = VirtueMartCart::getCart();
     if (!empty($cart->cartProductsData)) {
         vmJsApi::keepAlive(1, 4);
     }
 }
开发者ID:cybershocik,项目名称:Darek,代码行数:10,代码来源:vmview.php

示例3: display


//.........这里部分代码省略.........
        $close_ui_dialog_id = $input->get('ui_dialog_id', '', 'string');
        $parent_ui_dialog_id = $input->get('ui_dialog_id', '', 'string');
        $link_reload = $input->get('link_redirect', base64_encode('index.php?option=com_tsmart&view=' . $view), 'string');
        $parent_iframe_id = $input->get('iframe_id', '', 'string');
        $reload_iframe_id = $input->get('reload_iframe_id', '', 'string');
        $remove_ui_dialog = $input->get('remove_ui_dialog', false, 'boolean');
        $small_form = $input->get('small_form', 0, 'int');
        if ($this->show_in_parent_window == 1) {
            $doc->addScript(JUri::root() . '/administrator/components/com_tsmart/assets/js/asianventure_edit_from.js');
            $doc->addScript(JUri::root() . '/media/system/js/base64.js');
            $doc->addLessStyleSheet(JUri::root() . '/administrator/components/com_tsmart/assets/less/view_component.less');
            $js_content = '';
            ob_start();
            ?>
            <script type="text/javascript">
                jQuery(document).ready(function ($) {
                    $('.admin.com_tsmart.view-<?php 
            echo $view;
            ?>
').asianventure_edit_from({
                        show_in_parent_window:<?php 
            echo $this->show_in_parent_window == 1 ? 1 : 0;
            ?>
,
                        view_height:<?php 
            echo $this->view_height ? $this->view_height : 0;
            ?>
,
                        close_window_children:<?php 
            echo $this->close_window_children;
            ?>
,
                        dialog_element_id:'<?php 
            echo $dialog_element_id;
            ?>
',
                        link_reload:'<?php 
            echo $link_reload;
            ?>
',
                        parent_iframe_id:'<?php 
            echo $parent_iframe_id;
            ?>
',
                        parent_ui_dialog_id:'<?php 
            echo $parent_ui_dialog_id;
            ?>
',
                        close_ui_dialog_id:'<?php 
            echo $close_ui_dialog_id;
            ?>
',
                        reload_iframe_id:'<?php 
            echo $reload_iframe_id;
            ?>
',
                        remove_ui_dialog:'<?php 
            echo json_encode($remove_ui_dialog);
            ?>
',
                        small_form:<?php 
            echo $small_form;
            ?>
                    });
                });
            </script>
            <?php 
            $js_content = ob_get_clean();
            require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/utility.php';
            $js_content = TSMUtility::remove_string_javascript($js_content);
            $doc->addScriptDeclaration($js_content);
        }
        if ($view == 'tsmart' or $view == 'about' or $this->manager($view)) {
            //or $this->canDo->get('core.admin')
            //or $this->canDo->get('vm.'.$view) ) { //Super administrators always have access
            if (JFactory::getApplication()->isSite()) {
                $unoverridable = array('category', 'manufacturer', 'user');
                //This views have the same name and must not be overridable
                if (!in_array($view, $unoverridable)) {
                    if (!class_exists('VmTemplate')) {
                        require VMPATH_SITE . DS . 'helpers' . DS . 'vmtemplate.php';
                    }
                    $template = VmTemplate::getDefaultTemplate();
                    $this->addTemplatePath(VMPATH_ROOT . DS . 'templates' . DS . $template['template'] . DS . 'html' . DS . 'com_tsmart' . DS . $this->_name);
                }
            }
            $result = $this->loadTemplate($tpl);
            if ($result instanceof Exception) {
                return $result;
            }
            echo $result;
            if ($this->writeJs) {
                vmJsApi::keepAlive();
                echo vmJsApi::writeJS();
            }
            return true;
        } else {
            JFactory::getApplication()->redirect('index.php?option=com_tsmart', tsmText::_('JERROR_ALERTNOAUTHOR'), 'error');
        }
    }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:101,代码来源:tsmviewadmin.php


注:本文中的vmJsApi::keepAlive方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。