diff --git a/protected/src/controllers/app/home_ctrl.php b/protected/src/controllers/app/home_ctrl.php index 1eb8ea1..e9c15fa 100644 --- a/protected/src/controllers/app/home_ctrl.php +++ b/protected/src/controllers/app/home_ctrl.php @@ -34,7 +34,7 @@ class home_ctrl extends base_controller { return $this->response; } - public function name_demo() { + public function twig() { echo $this->footer; $this->view->set('twig_data', ['name' => "John Doe"]); @@ -58,11 +58,23 @@ class home_ctrl extends base_controller { public function extra() { $loaded = \CodeHydrater\extras_booter::tryToEnableFeature("testing", refresh: true); - if ($loaded === false) { - $content = "Unable to load Feature..."; + + if ($loaded->success === true) { + echo "
Doing more things...
"; + } else { + echo "Doing less things...
"; + } + + if ($loaded->named) { // a feature by that name was found + $e = $loaded->enabled ?? false; + $running = ($e) ? "enabled" : "disabled"; } else { - $content = ""; + $running = "not found!"; } + $content = "Feature is " . $running . "
"; + $content .= "License Status = " . $loaded->license_status . "
"; $this->response->set_content($content); return $this->response; diff --git a/protected/src/views/default/app/home_index.php b/protected/src/views/default/app/home_index.php index bf818e6..bd28722 100644 --- a/protected/src/views/default/app/home_index.php +++ b/protected/src/views/default/app/home_index.php @@ -3,7 +3,7 @@ declare(strict_types=1); $route_name_demo = "app/home"; -$method_name_demo = "name_demo"; +$method_name_demo = "twig"; $route_liquid = "app/home"; $method_liquid = "liquid";