summaryrefslogtreecommitdiff
path: root/src/web/_controller/template.php
blob: 879eadc5135a3afeb0fe6bc0a43d0cb34c1e7656 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php /* Copyright (c) 2024 Freya Murphy */
class Template_controller extends Controller {

	// the request model
	private $request_model;

	function __construct($load) {
		parent::__construct($load);
		$this->request_model = $this->load->model('request');
	}

	public function toast(): void {
		$data = array(
			'msg' => $this->request_model->get_str('msg', FALSE),
			'detail' => $this->request_model->get_str('detail', FALSE),
			'hint' => $this->request_model->get_str('hint', FALSE),
			'type' => $this->request_model->get_str('type', 'error')
		);
		$this->view('template/toast', $data);
	}

}