Diff
Index: notifications_edit.php
--- notifications_edit.php (nonexistent)
+++ notifications_edit.php (revision 4)
@@ -0,0 +1,32 @@
+<?php
+declare(strict_types = 1);
+
+namespace Views\admin\settings;
+
+use Apex\Svc{View, App};
+use App\Webapp\Models\EmailNotification;
+
+/**
+ * Render the template.
+ */
+class notifications_edit
+{
+
+ /**
+ * Render
+ */
+ public function render(View $view, App $app):void
+ {
+
+ // Get notification
+ if (!$email = EmailNotification::whereId($app->get('notification_id'))) {
+ throw new \Exception("Notification does not exist with id#, " . $app->get('notification_id'));
+ }
+
+ // Template variables
+ $view->assign('notify', $email->toArray());
+ }
+
+}
+
+
Full Code
<?php
declare(strict_types = 1);
namespace Views\admin\settings;
use Apex\Svc{View, App};
use App\Webapp\Models\EmailNotification;
/**
* Render the template.
*/
class notifications_edit
{
/**
* Render
*/
public function render(View $view, App $app):void
{
// Get notification
if (!$email = EmailNotification::whereId($app->get('notification_id'))) {
throw new \Exception("Notification does not exist with id#, " . $app->get('notification_id'));
}
// Template variables
$view->assign('notify', $email->toArray());
}
}