Files
Mataniko 4471b291a1 WEB: Convert all models to not be static objects
This is a first step towards moving to a dependency injection model.
2020-09-27 22:08:07 -04:00

33 lines
734 B
PHP

<?php
namespace ScummVM\Pages;
use ScummVM\Controller;
use ScummVM\Models\LinksModel;
class LinksPage extends Controller
{
private $linksModel;
/* Constructor. */
public function __construct()
{
parent::__construct();
$this->template = 'pages/links.tpl';
$this->linksModel = new LinksModel();
}
/* Display the index page. */
public function index()
{
$links = $this->linksModel->getAllGroupsAndLinks();
return $this->renderPage(
array(
'title' => $this->getConfigVars('linksTitle'),
'content_title' => $this->getConfigVars('linksContentTitle'),
'links' => $links,
)
);
}
}