main
Robert 2 months ago
parent 5fe600cb47
commit 97ffc7e47e
  1. 20
      protected/src/controllers/app/home_ctrl.php
  2. 2
      protected/src/views/default/app/home_index.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 "<p>Doing more things...</p>";
} else {
echo "<p>Doing less things...</p>";
}
if ($loaded->named) { // a feature by that name was found
$e = $loaded->enabled ?? false;
$running = ($e) ? "enabled" : "disabled";
} else {
$content = "";
$running = "not found!";
}
$content = "<h2 style='color: blue;'>" . $loaded->status_message . "</h2>";
$content .= "<h3 style='color: red;'>" . $loaded->errors . "</h3>";
$content .= "<p>Feature is " . $running . "</p>";
$content .= "<p>License Status = " . $loaded->license_status . "</p>";
$this->response->set_content($content);
return $this->response;

@ -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";

Loading…
Cancel
Save