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.
33 lines
831 B
PHP
33 lines
831 B
PHP
<?php
|
|
namespace ScummVM\Pages;
|
|
|
|
use ScummVM\Controller;
|
|
use ScummVM\Models\SimpleModel;
|
|
|
|
class DocumentationPage extends Controller
|
|
{
|
|
private $documentationModel;
|
|
|
|
/* Constructor. */
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->template = 'pages/documentation.tpl';
|
|
$this->documentationModel = new SimpleModel("Document", "documentation.yaml");
|
|
}
|
|
|
|
/* Display the index page. */
|
|
public function index()
|
|
{
|
|
$documents = $this->documentationModel->getAllData(false);
|
|
|
|
return $this->renderPage(
|
|
array(
|
|
'title' => $this->getConfigVars('documentationTitle'),
|
|
'content_title' => $this->getConfigVars('documentationContentTitle'),
|
|
'documents' => $documents,
|
|
)
|
|
);
|
|
}
|
|
}
|