本文整理匯總了PHP中JHtml::formatOptions方法的典型用法代碼示例。如果您正苦於以下問題:PHP JHtml::formatOptions方法的具體用法?PHP JHtml::formatOptions怎麽用?PHP JHtml::formatOptions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JHtml
的用法示例。
在下文中一共展示了JHtml::formatOptions方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: onAfterDispatch
function onAfterDispatch()
{
$app = JFactory::getApplication();
if ($app->isAdmin()) {
if ($this->_pluginHandler->checkSetupRequired()) {
$app->enqueueMessage(XiptText::_('JSPT_SETUP_SCREEN_IS_NOT_CLEAN_PLEASE_CLEAN_IT_STEP_BY_STEP'), 'error');
}
return true;
}
// get option, view and task
$option = JRequest::getVar('option');
$view = JRequest::getVar('view');
$task = JRequest::getVar('task');
// Hide Privacy menus
if ($option == 'com_community') {
self::_hidePrivacyMenus();
}
if ($option != 'com_community' || $view != 'search' || $task != 'advancesearch') {
return true;
}
$allTypes = XiptLibProfiletypes::getProfiletypeArray(array('published' => 1, 'visible' => 1));
if (!$allTypes) {
return false;
}
// when we are getting Html of select list(for Profile-Types)
//then don't addd "\n" at end of line
if (!XIPT_JOOMLA_15) {
JHtml::$formatOptions = array_merge(JHtml::$formatOptions, array('format.eol' => ""));
}
$profileType = JHTML::_('select.genericlist', $allTypes, 'profiletypes', 'class="inputbox"', 'id', 'name');
ob_start();
$this->_addXiptSearchScript($profileType);
$content = ob_get_contents();
ob_clean();
$doc = JFactory::getDocument();
if (XIPT_JOOMLA_15) {
JHTML::script('jquery1.4.2.js', 'components/com_xipt/assets/js/', true);
} else {
JHTML::script('components/com_xipt/assets/js/jquery1.4.2.js');
}
$doc->addCustomTag('<script type="text/javascript">jQuery.noConflict();</script>');
$doc->addScriptDeclaration($content);
return true;
}