From 5a2ba9c2e7605bb788bc406184547d22c6436867 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Mon, 23 Dec 2024 11:13:27 -0500 Subject: v2.1.0, refactor w/ crimson --- src/web/_controller/_template.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/web/_controller/_template.php (limited to 'src/web/_controller/_template.php') diff --git a/src/web/_controller/_template.php b/src/web/_controller/_template.php new file mode 100644 index 0000000..9c82956 --- /dev/null +++ b/src/web/_controller/_template.php @@ -0,0 +1,21 @@ +get_string('msg') ?? ''; + $detail = $this->get_string('detail'); + $hint = $this->get_string('hint'); + $type = $this->get_string('type', 'error'); + + $data = array( + 'msg' => $msg, + 'detail' => $detail, + 'hint' => $hint, + 'type' => $type, + ); + + $this->view('_template/toast', $data); + } + +} + -- cgit v1.2.3-freya