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