friendica-directory/src/classes/Controllers/Web/Page.php
Hypolite Petovan e36805c206 Add Custom Pages feature
- Add config/pages directory
- Add new custom pages controller and route
- Add generated links in the footer
2018-11-19 22:12:09 -05:00

29 lines
482 B
PHP

<?php
namespace Friendica\Directory\Controllers\Web;
/**
* @author Hypolite Petovan <mrpetovan@gmail.com>
*/
class Page extends BaseController
{
/**
* @var string
*/
private $pageFile;
public function __construct(
string $pageFile
)
{
$this->pageFile = $pageFile;
}
public function render(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args): array
{
$content = file_get_contents($this->pageFile);
return ['content' => $content];
}
}