phpmyadmin/libraries/controllers/server/ServerCollationsController.php
Maurício Meneghini Fauth ca910e8de8 Move classes to PhpMyAdmin namespace
- Move Table to PhpMyAdmin namespace
- Move Template to PhpMyAdmin namespace
- Move ThemeManager to PhpMyAdmin namespace
- Move Theme to PhpMyAdmin namespace
- Move Tracker to PhpMyAdmin namespace
- Move Transformations to PhpMyAdmin namespace
- Move TypesMySQL to PhpMyAdmin namespace
- Move Types to PhpMyAdmin namespace
- Move Util to PhpMyAdmin namespace
- Move VersionInformation to PhpMyAdmin namespace
- Move Url to PhpMyAdmin namespace

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-07-08 10:54:21 -03:00

69 lines
1.9 KiB
PHP

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Holds the PMA\libraries\controllers\server\ServerCollationsController
*
* @package PMA\libraries\controllers\server
*/
namespace PMA\libraries\controllers\server;
use PMA\libraries\controllers\Controller;
use PhpMyAdmin\Charsets;
use PhpMyAdmin\Template;
/**
* Handles viewing character sets and collations
*
* @package PMA\libraries\controllers\server
*/
class ServerCollationsController extends Controller
{
/**
* Index action
*
* @return void
*/
public function indexAction()
{
/**
* Does the common work
*/
include_once 'libraries/server_common.inc.php';
$this->response->addHTML(PMA_getHtmlForSubPageHeader('collations'));
$this->response->addHTML(
$this->_getHtmlForCharsets(
Charsets::getMySQLCharsets(),
Charsets::getMySQLCollations(),
Charsets::getMySQLCharsetsDescriptions(),
Charsets::getMySQLCollationsDefault()
)
);
}
/**
* Returns the html for server Character Sets and Collations.
*
* @param array $mysqlCharsets Mysql Charsets list
* @param array $mysqlCollations Mysql Collations list
* @param array $mysqlCharsetsDesc Charsets descriptions
* @param array $mysqlDftCollations Default Collations list
*
* @return string
*/
function _getHtmlForCharsets($mysqlCharsets, $mysqlCollations,
$mysqlCharsetsDesc, $mysqlDftCollations
) {
return Template::get('server/collations/charsets')->render(
array(
'mysql_charsets' => $mysqlCharsets,
'mysql_collations' => $mysqlCollations,
'mysql_charsets_desc' => $mysqlCharsetsDesc,
'mysql_dft_collations' => $mysqlDftCollations,
)
);
}
}