-
Notifications
You must be signed in to change notification settings - Fork 0
/
404.php
executable file
·38 lines (31 loc) · 887 Bytes
/
404.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* The template for displaying 404 pages (Not Found)
*
* Methods for TimberHelper can be found in the /functions sub-directory
*
* @package WordPress
* @subpackage Timber
* @since Timber 0.1
*/
namespace App;
use App\Http\Controllers\Controller;
use Rareloop\Lumberjack\Http\Responses\TimberResponse;
use Rareloop\Lumberjack\Page;
use Timber\Timber;
/**
* Class names can not start with a number so the 404 controller has a special cased name
*/
class Error404Controller extends Controller
{
public function handle()
{
$context = Timber::get_context();
$page = new Page(8300);
$context['post'] = $page;
$context['title'] = $page->title;
$context['content'] = $page->content;
$context['hide_title'] = $page->hide_title;
return new TimberResponse('templates/page.twig', $context, 404);
}
}