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


PHP vRequest::vmSpecialChars方法代码示例

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


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

示例1: showAdminMenu

    /**
     * Display the administrative ribbon menu.
     * @todo The link should be done better
     */
    static function showAdminMenu($vmView)
    {
        if (!isset(VmConfig::$installed)) {
            VmConfig::$installed = false;
        }
        if (!VmConfig::$installed) {
            return false;
        }
        $moduleId = vRequest::getInt('module_id', 0);
        $menuItems = AdminUIHelper::_getAdminMenu($moduleId);
        $app = JFactory::getApplication();
        $isSite = $app->isSite();
        ?>
		<div id="admin-ui-menu" class="admin-ui-menu">
		<?php 
        $modCount = 1;
        foreach ($menuItems as $item) {
            $html = '';
            foreach ($item['items'] as $link) {
                $target = '';
                if ($link['name'] == '-') {
                    // it was emtpy before
                } else {
                    if (strncmp($link['link'], 'http', 4) === 0) {
                        $url = $link['link'];
                        $target = 'target="_blank"';
                    } else {
                        $url = $link['link'] === '' ? 'index.php?option=com_virtuemart' : $link['link'];
                        $url .= $link['view'] ? "&view=" . $link['view'] : '';
                        $url .= $link['task'] ? "&task=" . $link['task'] : '';
                        $url .= $isSite ? '&tmpl=component&manage=1' : '';
                        // $url .= $link['extra'] ? $link['extra'] : '';
                        $url = vRequest::vmSpecialChars($url);
                    }
                    if ($vmView->manager($link['view']) || $target || $link['view'] == 'about' || $link['view'] == 'virtuemart') {
                        $html .= '
						<li>
							<a href="' . $url . '" ' . $target . '>
								<span class="vmicon-wrapper"><span class="' . $link['icon_class'] . '"></span></span>
								<span class="menu-subtitle">' . vmText::_($link['name']) . '</span>
							</a>
						</li>';
                    }
                }
            }
            if (!empty($html)) {
                ?>
				<h3 class="menu-title">
					<span class="menu-title-wrapper">
						<span class="vmicon-wrapper"><span class="<?php 
                echo vmText::_($item['items'][0]['icon_class']);
                ?>
"></span></span>
						<span class="menu-title-content"><?php 
                echo vmText::_($item['title']);
                ?>
</span>
					</span>
				</h3>

				<div class="menu-list">
					<ul>
						<?php 
                echo $html;
                ?>
					</ul>
				</div>
				<?php 
                $modCount++;
            }
        }
        ?>
		<div class="menu-notice"></div>
		</div>
	<?php 
    }
开发者ID:cybershocik,项目名称:Darek,代码行数:80,代码来源:adminui.php

示例2: getVMComponent

    public static function getVMComponent($authCheck = true)
    {
        $lang = JFactory::getLanguage();
        $user = JFactory::getUser();
        $db = JFactory::getDBO();
        $q = 'SELECT m.id, m.title, m.alias, m.link, m.parent_id, m.img, e.element FROM `#__menu` as m
				LEFT JOIN #__extensions AS e ON m.component_id = e.extension_id
		         WHERE m.client_id = 1 AND e.enabled = 1 AND m.id > 1 AND e.element = \'com_virtuemart\'
		         AND (m.parent_id=1 OR m.parent_id =
			                        (SELECT m.id FROM `#__menu` as m
									LEFT JOIN #__extensions AS e ON m.component_id = e.extension_id
			                        WHERE m.parent_id=1 AND m.client_id = 1 AND e.enabled = 1 AND m.id > 1 AND e.element = \'com_virtuemart\'))
		         ORDER BY m.lft';
        $db->setQuery($q);
        $vmComponentItems = $db->loadObjectList();
        $result = new stdClass();
        if (!class_exists('tsmConfig')) {
            require JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php';
        }
        tsmConfig::loadConfig();
        if ($vmComponentItems) {
            if (!class_exists('tsmConfig')) {
                require JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php';
            }
            tsmConfig::loadJLang('com_virtuemart.sys');
            // Parse the list of extensions.
            foreach ($vmComponentItems as &$vmComponentItem) {
                $vmComponentItem->link = vRequest::vmSpecialChars(trim($vmComponentItem->link));
                if ($vmComponentItem->parent_id == 1) {
                    if ($authCheck == false || $authCheck && $user->authorise('core.manage', $vmComponentItem->element)) {
                        $result = $vmComponentItem;
                        if (!isset($result->submenu)) {
                            $result->submenu = array();
                        }
                        if (empty($vmComponentItem->link)) {
                            $vmComponentItem->link = 'index.php?option=' . $vmComponentItem->element;
                        }
                        $vmComponentItem->text = $lang->hasKey($vmComponentItem->title) ? JText::_($vmComponentItem->title) : $vmComponentItem->alias;
                    }
                } else {
                    // Sub-menu level.
                    if (isset($result)) {
                        // Add the submenu link if it is defined.
                        if (isset($result->submenu) && !empty($vmComponentItem->link)) {
                            $vmComponentItem->text = $lang->hasKey($vmComponentItem->title) ? JText::_($vmComponentItem->title) : $vmComponentItem->alias;
                            $class = preg_replace('#\\.[^.]*$#', '', basename($vmComponentItem->img));
                            $class = preg_replace('#\\.\\.[^A-Za-z0-9\\.\\_\\- ]#', '', $class);
                            if (JVM_VERSION < 3) {
                                $vmComponentItem->class = "icon-16-" . $class;
                            } else {
                                $vmComponentItem->class = '';
                            }
                            $result->submenu[] =& $vmComponentItem;
                        }
                    }
                }
            }
            $props = get_object_vars($result);
            if (!empty($props)) {
                return $result;
            }
        }
        return false;
    }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:64,代码来源:helper.php

示例3:

						<?php 
            // echo vmCommonHTML::getOrderingField( $product->ordering );
            ?>
					</td>
				<?php 
        }
        ?>
				<!-- Manufacturer name -->
				<td><?php 
        echo $product->manuList;
        ?>
</td>

				<!-- Reviews -->
				<?php 
        $link = vRequest::vmSpecialChars('index.php?option=com_virtuemart&view=ratings&task=listreviews&virtuemart_product_id=' . $product->virtuemart_product_id);
        ?>
				<td align="center" ><?php 
        echo JHtml::_('link', $link, $product->reviews);
        ?>
</td>
				<td align="center" >
					<?php 
        echo $is_featured;
        ?>
				 </td>
				<!-- published -->
				<td align="center" ><?php 
        echo $published;
        ?>
</td>
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:31,代码来源:default.php


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