本文整理汇总了PHP中SEFTools::getExtFilters方法的典型用法代码示例。如果您正苦于以下问题:PHP SEFTools::getExtFilters方法的具体用法?PHP SEFTools::getExtFilters怎么用?PHP SEFTools::getExtFilters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SEFTools
的用法示例。
在下文中一共展示了SEFTools::getExtFilters方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($tpl = null)
{
// Get data from the model
$extension =& $this->get('extension');
$this->assignRef('extension', $extension);
$this->langs = $this->get('languages');
$this->strings = $this->get('strings');
$this->translation = $this->get('translation');
$this->subdomains = $this->get('subdomains');
$this->menus = $this->get('menus');
$filters =& SEFTools::getExtFilters($extension->option, false);
$this->assignRef('filters', $filters);
$acceptVars =& SEFTools::getExtAcceptVars($extension->option, false);
sort($acceptVars, SORT_STRING);
$this->assignRef('acceptVars', $acceptVars);
// Root domain for subdomains configuration
$rootDomain = JFactory::getURI()->getHost();
if (substr($rootDomain, 0, 4) == 'www.') {
$rootDomain = substr($rootDomain, 4);
}
$this->assign('rootDomain', $rootDomain);
JToolBarHelper::title(JText::_('SEF Extension') . ' <small>' . JText::_('Edit') . ' [ ' . (strlen($extension->name) ? $extension->name : $extension->component->name) . ' ]</small>', 'plugin.png');
JToolBarHelper::save();
JToolBarHelper::apply();
JToolBarHelper::spacer();
JToolBarHelper::cancel();
JHTML::_('behavior.tooltip');
$redir = JRequest::getVar('redirto', '');
$this->assignRef('redirto', $redir);
parent::display($tpl);
}
示例2: display
function display($tpl = null)
{
// Get data from the model
$extension =& $this->get('extension');
$this->assignRef('extension', $extension);
$filters =& SEFTools::getExtFilters($extension->option, false);
$this->assignRef('filters', $filters);
$acceptVars =& SEFTools::getExtAcceptVars($extension->option, false);
sort($acceptVars, SORT_STRING);
$this->assignRef('acceptVars', $acceptVars);
JToolBarHelper::title(JText::_('SEF Extension') . ' <small>' . JText::_('Edit') . ' [ ' . $extension->name . ' ]</small>', 'plugin.png');
JToolBarHelper::save();
JToolBarHelper::apply();
JToolBarHelper::spacer();
JToolBarHelper::cancel();
JHTML::_('behavior.tooltip');
$redir = JRequest::getVar('redirto', '');
$this->assignRef('redirto', $redir);
// Sliding pane
$pane =& JPane::getInstance('tabs');
$this->assignRef('pane', $pane);
parent::display($tpl);
}
示例3: array
function &getExtFiltersByVars($option, $includeGlobal = true)
{
static $byVars;
if (!isset($byVars)) {
$byVars = array();
}
if (empty($option)) {
$option = '_default';
}
if (!isset($byVars[$option])) {
$byVars[$option] = array();
// Get filters
$filters =& SEFTools::getExtFilters($option, $includeGlobal);
if (count($filters) > 0) {
// Loop through filter types (pos, neg)
foreach ($filters as $type => $typeFilters) {
if (count($typeFilters) > 0) {
// Loop through filters
foreach ($typeFilters as $filter) {
if (count($filter->vars) > 0) {
// Loop through variables
foreach ($filter->vars as $var) {
// Add filter to var and type
if (!isset($byVars[$option][$var])) {
$byVars[$option][$var] = array();
}
if (!isset($byVars[$option][$var][$type])) {
$byVars[$option][$var][$type] = array();
}
$byVars[$option][$var][$type][] = $filter->rule;
}
}
}
}
}
}
}
return $byVars[$option];
}