本文整理汇总了PHP中PMA_Config::getFontsizeOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_Config::getFontsizeOptions方法的具体用法?PHP PMA_Config::getFontsizeOptions怎么用?PHP PMA_Config::getFontsizeOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMA_Config
的用法示例。
在下文中一共展示了PMA_Config::getFontsizeOptions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFontsizeSelection
/**
* returns html selectbox for font sizes
*
* @uses $_SESSION['PMA_Config']
* @uses PMA_Config::get()
* @uses PMA_Config::getFontsizeOptions()
* @uses $GLOBALS['strFontSize']
* @static
* @param string $current_size currently slected font size with unit
* @return string html selectbox
*/
function getFontsizeSelection()
{
$current_size = $_SESSION['PMA_Config']->get('fontsize');
$options = PMA_Config::getFontsizeOptions($current_size);
$return = '<label for="select_fontsize">' . $GLOBALS['strFontSize'] . ':</label>' . "\n";
$return .= '<select name="fontsize" id="select_fontsize" onchange="this.form.submit();">' . "\n";
foreach ($options as $option) {
$return .= '<option value="' . $option . '"';
if ($option == $current_size) {
$return .= ' selected="selected"';
}
$return .= '>' . $option . '</option>' . "\n";
}
$return .= '</select>';
return $return;
}
示例2: getFontsizeSelection
/**
* returns html selectbox for font sizes
*
* @static
*
* @return string html selectbox
*/
protected static function getFontsizeSelection()
{
$current_size = $GLOBALS['PMA_Config']->get('fontsize');
// for the case when there is no config file (this is supported)
if (empty($current_size)) {
if (isset($_COOKIE['pma_fontsize'])) {
$current_size = htmlspecialchars($_COOKIE['pma_fontsize']);
} else {
$current_size = '82%';
}
}
$options = PMA_Config::getFontsizeOptions($current_size);
$return = '<label for="select_fontsize">' . __('Font size') . ':</label>' . "\n" . '<select name="set_fontsize" id="select_fontsize"' . ' class="autosubmit">' . "\n";
foreach ($options as $option) {
$return .= '<option value="' . $option . '"';
if ($option == $current_size) {
$return .= ' selected="selected"';
}
$return .= '>' . $option . '</option>' . "\n";
}
$return .= '</select>';
return $return;
}
示例3: getFontsizeSelection
/**
* returns html selectbox for font sizes
*
* @uses $_SESSION['PMA_Config']
* @uses PMA_Config::get()
* @uses PMA_Config::getFontsizeOptions()
* @uses $GLOBALS['strFontSize']
* @static
* @param string $current_size currently slected font size with unit
* @return string html selectbox
*/
function getFontsizeSelection()
{
$current_size = $_SESSION['PMA_Config']->get('fontsize');
// for the case when there is no config file (this is supported)
if (empty($current_size)) {
if (isset($_COOKIE['pma_fontsize'])) {
$current_size = $_COOKIE['pma_fontsize'];
} else {
$current_size = '82%';
}
}
$options = PMA_Config::getFontsizeOptions($current_size);
$return = '<label for="select_fontsize">' . $GLOBALS['strFontSize'] . ':</label>' . "\n";
$return .= '<select name="fontsize" id="select_fontsize" onchange="this.form.submit();">' . "\n";
foreach ($options as $option) {
$return .= '<option value="' . $option . '"';
if ($option == $current_size) {
$return .= ' selected="selected"';
}
$return .= '>' . $option . '</option>' . "\n";
}
$return .= '</select>';
return $return;
}