phpmyadmin/libraries/classes/Controllers/ThemesController.php
Maurício Meneghini Fauth be95d29206 Create ThemesController
Moves themes entry point logic to the ThemesController and removes the
themes.php entry point file.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-05 10:56:40 -03:00

38 lines
883 B
PHP

<?php
/**
* @package PhpMyAdmin\Controllers
*/
declare(strict_types=1);
namespace PhpMyAdmin\Controllers;
use PhpMyAdmin\ThemeManager;
/**
* Displays list of themes.
* @package PhpMyAdmin\Controllers
*/
class ThemesController extends AbstractController
{
/**
* @return string
*/
public function index(): string
{
$this->response->getFooter()->setMinimal();
$header = $this->response->getHeader();
$header->setBodyId('bodythemes');
$header->setTitle('phpMyAdmin - ' . __('Theme'));
$header->disableMenuAndConsole();
return $this->template->render('themes', [
'version' => preg_replace(
'/([0-9]*)\.([0-9]*)\..*/',
'\1_\2',
PMA_VERSION
),
'previews' => ThemeManager::getInstance()->getPrintPreviews(),
]);
}
}