Files
scummvm-web/include/Pages/SponsorsPage.php
Mataniko db6cb726e8 WEB: Add a new SimpleModel class
The SimpleModel is used to to read simple data models from YAML that require no further processing

This allows us to delete several models that re-use the same code.
2020-09-27 22:08:07 -04:00

32 lines
786 B
PHP

<?php
namespace ScummVM\Pages;
use ScummVM\Controller;
use ScummVM\Models\SimpleModel;
class SponsorsPage extends Controller
{
private $sponsorsModel;
/* Constructor. */
public function __construct()
{
parent::__construct();
$this->template = 'pages/sponsors.tpl';
$this->sponsorsModel = new SimpleModel("Sponsor", "sponsors.yaml");
}
/* Display the index page. */
public function index()
{
$sponsors = $this->sponsorsModel->getAllData(false);
return $this->renderPage(
array(
'title' => $this->getConfigVars('sponsorsTitle'),
'content_title' => $this->getConfigVars('sponsorsContentTitle'),
'sponsors' => $sponsors,
)
);
}
}