本文整理汇总了PHP中JCckDevHelper::matchUrlVars方法的典型用法代码示例。如果您正苦于以下问题:PHP JCckDevHelper::matchUrlVars方法的具体用法?PHP JCckDevHelper::matchUrlVars怎么用?PHP JCckDevHelper::matchUrlVars使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JCckDevHelper
的用法示例。
在下文中一共展示了JCckDevHelper::matchUrlVars方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getForms
public static function getForms($url = '', &$type = '', $grouping = '')
{
$app = JFactory::getApplication();
$items = array();
if (is_object($url)) {
$option = $url->get('option', '');
$view = $url->get('view', '');
} elseif ($url != 'none') {
$option = $app->input->get('option', '');
$view = $app->input->get('view', '');
} else {
$option = '';
}
$in = '';
$where = '';
if ($option) {
$where = 'WHERE a.component = "' . $option . '"';
if ($view) {
$where .= ' AND ( a.view = "' . $view . '" OR a.view = "" )';
}
}
$locations = JCckDatabase::loadObjectList('SELECT a.name, a.vars FROM #__cck_core_objects AS a ' . $where);
if (count($locations)) {
$state = true;
foreach ($locations as $location) {
if ($location->vars) {
$state = JCckDevHelper::matchUrlVars($location->vars, $url);
}
if ($state !== false) {
$in .= '"' . $location->name . '",';
}
}
}
if ($in) {
$type = substr($in, 1, -2);
$in .= '""';
if ($grouping == 'folder') {
$call = 'loadObjectListArray';
$index = 'folder_id';
$order_by = ' ORDER BY folder ASC, title ASC';
} else {
$call = 'loadObjectList';
$index = NULL;
$order_by = ' ORDER BY title';
}
$items = JCckDatabase::$call('SELECT a.id, a.title, a.name, a.description, b.id as folder_id, b.title as folder, b.app as folder_app, b.icon_path as folder_icon' . ' FROM #__cck_core_types AS a' . ' LEFT JOIN #__cck_core_folders AS b ON b.id = a.folder' . ' WHERE a.published = 1 AND a.location != "none" AND a.location != "site"' . ' AND a.storage_location IN (' . $in . ')' . $order_by, $index);
}
return $items;
}
示例2: defined
/**
* @version SEBLOD 3.x Core ~ $Id: mod_cck_list.php sebastienheraud $
* @package SEBLOD (App Builder & CCK) // SEBLOD nano (Form Builder)
* @url http://www.seblod.com
* @editor Octopoos - www.octopoos.com
* @copyright Copyright (C) 2013 SEBLOD. All Rights Reserved.
* @license GNU General Public License version 2 or later; see _LICENSE.php
**/
defined('_JEXEC') or die;
$show = $params->get('url_show', '');
$hide = $params->get('url_hide', '');
if ($show && JCckDevHelper::matchUrlVars($show) === false) {
return;
}
if ($hide && JCckDevHelper::matchUrlVars($hide) !== false) {
return;
}
$app = JFactory::getApplication();
$uniqId = 'm' . $module->id;
$formId = 'seblod_form_' . $uniqId;
if (!defined('JPATH_LIBRARIES_CCK')) {
define('JPATH_LIBRARIES_CCK', JPATH_SITE . '/libraries/cck');
}
if (!defined('JROOT_MEDIA_CCK')) {
define('JROOT_MEDIA_CCK', JURI::root(true) . '/media/cck');
}
JCck::loadjQuery();
JFactory::getLanguage()->load('com_cck_default', JPATH_SITE);
require_once JPATH_SITE . '/components/com_cck/helpers/helper_include.php';
$preconfig = array();