本文整理汇总了PHP中FOFModel::getState方法的典型用法代码示例。如果您正苦于以下问题:PHP FOFModel::getState方法的具体用法?PHP FOFModel::getState怎么用?PHP FOFModel::getState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FOFModel
的用法示例。
在下文中一共展示了FOFModel::getState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderFormBrowse
//.........这里部分代码省略.........
continue;
}
// If it's a sortable field, add to the list of sortable fields
if ($sortable) {
$sortFields[$headerField->name] = JText::_($headerField->label);
}
// Get the table data width, if set
if (!empty($tdwidth)) {
$tdwidth = 'width="' . $tdwidth . '"';
} else {
$tdwidth = '';
}
if (!empty($header)) {
$header_html .= "\t\t\t\t\t<th {$tdwidth}>" . PHP_EOL;
$header_html .= "\t\t\t\t\t\t" . $header;
$header_html .= "\t\t\t\t\t</th>" . PHP_EOL;
}
if (FOFPlatform::getInstance()->checkVersion(JVERSION, '3.0', 'ge')) {
// Joomla! 3.0 or later
if (!empty($filter)) {
$filter_html .= '<div class="filter-search btn-group pull-left">' . "\n";
$filter_html .= "\t" . '<label for="title" class="element-invisible">';
$filter_html .= JText::_($headerField->label);
$filter_html .= "</label>\n";
$filter_html .= "\t{$filter}\n";
$filter_html .= "</div>\n";
if (!empty($buttons)) {
$filter_html .= '<div class="btn-group pull-left hidden-phone">' . "\n";
$filter_html .= "\t{$buttons}\n";
$filter_html .= '</div>' . "\n";
}
} elseif (!empty($options)) {
$label = $headerField->label;
JHtmlSidebar::addFilter('- ' . JText::_($label) . ' -', (string) $headerField->name, JHtml::_('select.options', $options, 'value', 'text', $model->getState($headerField->name, ''), true));
}
} else {
// Joomla! 2.5
$filter_html .= "\t\t\t\t\t<td>" . PHP_EOL;
if (!empty($filter)) {
$filter_html .= "\t\t\t\t\t\t{$filter}" . PHP_EOL;
if (!empty($buttons)) {
$filter_html .= '<div class="btn-group pull-left hidden-phone">' . PHP_EOL;
$filter_html .= "\t\t\t\t\t\t{$buttons}" . PHP_EOL;
$filter_html .= '</div>' . PHP_EOL;
}
} elseif (!empty($options)) {
$label = $headerField->label;
$emptyOption = JHtml::_('select.option', '', '- ' . JText::_($label) . ' -');
array_unshift($options, $emptyOption);
$attribs = array('onchange' => 'document.adminForm.submit();');
$filter = JHtml::_('select.genericlist', $options, $headerField->name, $attribs, 'value', 'text', $headerField->value, false, true);
$filter_html .= "\t\t\t\t\t\t{$filter}" . PHP_EOL;
}
$filter_html .= "\t\t\t\t\t</td>" . PHP_EOL;
}
}
}
// Start the form
$filter_order = $form->getView()->getLists()->order;
$filter_order_Dir = $form->getView()->getLists()->order_Dir;
$html .= '<form action="index.php" method="post" name="adminForm" id="adminForm">' . PHP_EOL;
if (FOFPlatform::getInstance()->checkVersion(JVERSION, '3.0', 'ge')) {
// Joomla! 3.0+
// Get and output the sidebar, if present
$sidebar = JHtmlSidebar::render();
if ($show_filters && !empty($sidebar)) {