|
|
@@ -7,6 +7,7 @@
|
|
|
|
|
|
namespace OpenMind\Admin;
|
|
|
|
|
|
+use Base;
|
|
|
use Exception;
|
|
|
use OpenMind\FindBox\FindBoxCoreSystem;
|
|
|
use OpenMind\FindBox\SmartESL;
|
|
|
@@ -20,7 +21,7 @@ class Pages extends Controller
|
|
|
|
|
|
/**
|
|
|
* Pages constructor.
|
|
|
- * @param \Base $f3
|
|
|
+ * @param Base $f3
|
|
|
*/
|
|
|
public function __construct($f3)
|
|
|
{
|
|
|
@@ -28,7 +29,7 @@ class Pages extends Controller
|
|
|
|
|
|
try {
|
|
|
$this->findBoxCore = new FindBoxCoreSystem(...array_values($f3->get('CORE.fb')));
|
|
|
- } catch (\Exception $e) {
|
|
|
+ } catch (Exception $e) {
|
|
|
$ns = new Notifications();
|
|
|
$ns->notify(Notifications::FB_ADMIN, $f3->clean($e->getMessage()));
|
|
|
// IF can't connect to FINDBOX, reroute to OMLINK Page Settings to fast change settings
|
|
|
@@ -45,7 +46,7 @@ class Pages extends Controller
|
|
|
echo Template::instance()->render('masterpage.tpl');
|
|
|
}
|
|
|
|
|
|
- public function ESLStatus($f3)
|
|
|
+ public function ESLStatus(Base $f3)
|
|
|
{
|
|
|
$eslStatus = $this->findBoxCore->GetAllESLStatus();
|
|
|
|
|
|
@@ -68,7 +69,7 @@ class Pages extends Controller
|
|
|
echo Template::instance()->render('masterpage.tpl');
|
|
|
}
|
|
|
|
|
|
- public function OML_Settings($f3)
|
|
|
+ public function OML_Settings(Base $f3)
|
|
|
{
|
|
|
global $frameworkUtils;
|
|
|
|
|
|
@@ -85,7 +86,7 @@ class Pages extends Controller
|
|
|
echo Template::instance()->render('masterpage.tpl');
|
|
|
}
|
|
|
|
|
|
- public function Config($f3)
|
|
|
+ public function Config(Base $f3)
|
|
|
{
|
|
|
global $frameworkUtils;
|
|
|
$config = $f3->get('BODY');
|
|
|
@@ -192,9 +193,9 @@ class Pages extends Controller
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- private function TemplateSelector($f3, $Command)
|
|
|
+ private function TemplateSelector(Base $f3, $Command)
|
|
|
{
|
|
|
- global $f3, $frameworkUtils;
|
|
|
+ global $frameworkUtils;
|
|
|
|
|
|
$fb_template = $this->findBoxCore->CallAPI('/1.0.0/index.php/smartesl.gettemplates/1.0.0/', '[]');
|
|
|
$templates = $this->findBoxCore->getLabelsFromResponse($fb_template);
|
|
|
@@ -232,8 +233,14 @@ class Pages extends Controller
|
|
|
|
|
|
}
|
|
|
|
|
|
- public function Users($f3)
|
|
|
+ public function Users(Base $f3)
|
|
|
{
|
|
|
+ $f3->set('USERLIST',
|
|
|
+ [
|
|
|
+ ['username' => 'giancarlo'],
|
|
|
+ ['username' => 'luigi']
|
|
|
+ ]
|
|
|
+ );
|
|
|
$f3->set('PAGENAME', 'User Management');
|
|
|
$f3->set('CONTENT', 'users.tpl');
|
|
|
echo Template::instance()->render('masterpage.tpl');
|