mirror of
https://github.com/scummvm/scummvm-web.git
synced 2026-05-21 05:40:47 +00:00
db6cb726e8
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.
32 lines
786 B
PHP
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,
|
|
)
|
|
);
|
|
}
|
|
}
|