From 03f937f9d2d53aad450f7e0264435cd35e877085 Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Sun, 21 Jan 2018 16:58:19 +0000 Subject: [PATCH] Refactor /manage and SlateAdmin backend configuration into namespaced class pair --- php-classes/SlateAdmin.php | 11 --------- php-classes/SlateAdmin/RequestHandler.php | 13 ++++++++++ php-classes/SlateAdmin/WebApp.php | 29 +++++++++++++++++++++++ site-root/manage.php | 6 +---- 4 files changed, 43 insertions(+), 16 deletions(-) delete mode 100644 php-classes/SlateAdmin.php create mode 100644 php-classes/SlateAdmin/RequestHandler.php create mode 100644 php-classes/SlateAdmin/WebApp.php diff --git a/php-classes/SlateAdmin.php b/php-classes/SlateAdmin.php deleted file mode 100644 index 5313b5b..0000000 --- a/php-classes/SlateAdmin.php +++ /dev/null @@ -1,11 +0,0 @@ -requireAccountLevel('Staff'); + return static::sendResponse(WebApp::load()->render(), 'webapps/SlateAdmin'); + } +} \ No newline at end of file diff --git a/php-classes/SlateAdmin/WebApp.php b/php-classes/SlateAdmin/WebApp.php new file mode 100644 index 0000000..f0bd6e7 --- /dev/null +++ b/php-classes/SlateAdmin/WebApp.php @@ -0,0 +1,29 @@ +setPayloadKey('plugins', static::getPlugins()); + + return $response; + } +} \ No newline at end of file diff --git a/site-root/manage.php b/site-root/manage.php index 4c2b439..13b9b5e 100644 --- a/site-root/manage.php +++ b/site-root/manage.php @@ -1,7 +1,3 @@ requireAccountLevel('Staff'); - -$app = Emergence\WebApps\App::get('SlateAdmin'); - -Emergence\Site\RequestHandler::sendResponse($app->render(), 'webapps/SlateAdmin'); \ No newline at end of file +SlateAdmin\RequestHandler::handleRequest(); \ No newline at end of file