本文整理汇总了PHP中FlexicontentFields::renderFilters方法的典型用法代码示例。如果您正苦于以下问题:PHP FlexicontentFields::renderFilters方法的具体用法?PHP FlexicontentFields::renderFilters怎么用?PHP FlexicontentFields::renderFilters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FlexicontentFields
的用法示例。
在下文中一共展示了FlexicontentFields::renderFilters方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
//.........这里部分代码省略.........
$src = $base_url . $src;
$image = JURI::base(true) . '/components/com_flexicontent/librairies/phpthumb/phpThumb.php?src=' . $src . $conf;
}
}
$cat->image_src = @$src;
// Also add image category URL for developers
if ($image) {
$image = '<img class="fccat_image" src="' . $image . '" alt="' . $this->escape($cat->title) . '" title="' . $this->escape($cat->title) . '"/>';
} else {
//$image = '<div class="fccat_image" style="height:'.$cat_image_height.'px;width:'.$cat_image_width.'px;" ></div>';
}
if ($cat_link_image && $image) {
$image = '<a href="' . JRoute::_(FlexicontentHelperRoute::getCategoryRoute($cat->slug)) . '">' . $image . '</a>';
}
}
$cat->image = $image;
}
// remove previous alpha index filter
//$uri->delVar('letter');
// remove filter variables (includes search box and sort order)
preg_match_all('/filter[^=]*/', $uri->toString(), $matches);
foreach ($matches[0] as $match) {
//$uri->delVar($match);
}
// Build Lists
$lists = array();
//ordering
$lists['filter_order'] = JRequest::getCmd('filter_order', 'i.title', 'default');
$lists['filter_order_Dir'] = JRequest::getCmd('filter_order_Dir', 'ASC', 'default');
$lists['filter'] = JRequest::getString('filter', '', 'default');
// Add html to filter objects
$form_name = 'adminForm';
if ($filters) {
FlexicontentFields::renderFilters($params, $filters, $form_name);
}
// ****************************
// Create the pagination object
// ****************************
$pageNav = $this->get('pagination');
$resultsCounter = $pageNav->getResultsCounter();
// for overriding model's result counter
// *********************************************************************
// Create category link, but also consider current 'layout', and use the
// layout specific variables so that filtering form will work properly
// *********************************************************************
$Itemid = $menu ? $menu->id : 0;
$layout_vars = array();
if ($layout) {
$layout_vars['layout'] = $layout;
}
if ($authorid) {
$layout_vars['authorid'] = $authorid;
}
if ($tagid) {
$layout_vars['tagid'] = $tagid;
}
if ($cids) {
$layout_vars['cids'] = $cids;
}
// Category link for single/multiple category(-ies) --OR-- "current layout" link for myitems/author layouts
if ($cid) {
$category_link = JRoute::_(FlexicontentHelperRoute::getCategoryRoute($category->slug, $Itemid, $layout_vars), false);
} else {
$urlvars_str = '';
foreach ($layout_vars as $urlvar_name => $urlvar_val) {
$urlvars_str .= '&' . $urlvar_name . '=' . $urlvar_val;
示例2: foreach
}
// Remove categories filter
if ($display_cat_list || $catid) {
foreach ($filters as $i => $filter) {
if ($filter->field_type == 'categories') {
unset($filters[$i]);
break;
}
}
}
// Set filter values (initial or locked) via configuration parameters
FlexicontentFields::setFilterValues($params, 'persistent_filters', $is_persistent = 1);
FlexicontentFields::setFilterValues($params, 'initial_filters', $is_persistent = 0);
// 4. Add html to filter objects
if (!empty($filters)) {
FlexicontentFields::renderFilters($params, $filters, $form_name);
}
// Restore variables
JRequest::setVar('cid', $saved_cid);
// restore cid
JRequest::setVar('layout', $saved_layout);
// restore layout
JRequest::setVar('option', $saved_option);
// restore option
JRequest::setVar('view', $saved_view);
// restore view
// Load needed JS libs & CSS styles
FLEXI_J30GE ? JHtml::_('behavior.framework', true) : JHTML::_('behavior.mootools');
flexicontent_html::loadFramework('jQuery');
flexicontent_html::loadFramework('flexi_tmpl_common');
// Add tooltips
示例3: display
//.........这里部分代码省略.........
}
}
$cat->image_src = @$src;
// Also add image category URL for developers
if ($image) {
$image = '<img class="fccat_image" src="' . $image . '" alt="' . $this->escape($cat->title) . '" title="' . $this->escape($cat->title) . '"/>';
} else {
if ($default_image) {
$image = sprintf($default_image, $cat->title, $cat->title);
}
}
if ($cat_link_image && $image) {
$image = '<a href="' . JRoute::_(FlexicontentHelperRoute::getCategoryRoute($cat->slug)) . '">' . $image . '</a>';
}
}
$cat->image = $image;
}
// remove previous alpha index filter
//$uri->delVar('letter');
// remove filter variables (includes search box and sort order)
preg_match_all('/filter[^=]*/', $uri->toString(), $matches);
foreach ($matches[0] as $match) {
//$uri->delVar($match);
}
// Build Lists
$lists = array();
//ordering
$lists['filter_order'] = JRequest::getCmd('filter_order', 'i.title', 'default');
$lists['filter_order_Dir'] = JRequest::getCmd('filter_order_Dir', 'ASC', 'default');
$lists['filter'] = JRequest::getString('filter', '', 'default');
// Add html to filter objects
$form_name = 'adminForm';
if ($filters) {
FlexicontentFields::renderFilters($params, $filters, $form_name);
}
// ****************************
// Create the pagination object
// ****************************
$pageNav = $this->get('pagination');
$_revert = array('%21' => '!', '%2A' => '*', '%27' => "'", '%28' => '(', '%29' => ')');
// URL-encode filter values
foreach ($_GET as $i => $v) {
if (substr($i, 0, 6) === "filter") {
if (is_array($v)) {
foreach ($v as $ii => &$vv) {
$vv = str_replace('&', '__amp__', $vv);
$vv = strtr(rawurlencode($vv), $_revert);
$pageNav->setAdditionalUrlParam($i . '[' . $ii . ']', $vv);
}
unset($vv);
} else {
$v = str_replace('&', '__amp__', $v);
$v = strtr(rawurlencode($v), $_revert);
$pageNav->setAdditionalUrlParam($i, $v);
}
}
}
$resultsCounter = $pageNav->getResultsCounter();
// for overriding model's result counter
// **********************************************************************
// Print link ... must include layout and current filtering url vars, etc
// **********************************************************************
$curr_url = str_replace('&', '&', $_SERVER['REQUEST_URI']);
$print_link = $curr_url . (strstr($curr_url, '?') ? '&' : '?') . 'pop=1&tmpl=component&print=1';
$pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
$this->assignRef('layout_vars', $layout_vars);