Pages.php 1004 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * @author Open Mind
  4. * @date 04/12/2018
  5. * @time 15:22
  6. */
  7. namespace OpenMind\Admin;
  8. use OpenMind\FindBox\FindBoxCoreSystem;
  9. use OpenMind\Web\Controller;
  10. use Template;
  11. class Pages extends Controller
  12. {
  13. private $findBoxCore = null;
  14. public function __construct($f3)
  15. {
  16. parent::__construct($f3);
  17. $this->findBoxCore = new FindBoxCoreSystem(...array_values($f3->get('CORE.fb')));
  18. // Set Admin F3 UI folder
  19. $f3->set('UI', 'src/OpenMind/Admin/ui/');
  20. }
  21. public function Admin($f3)
  22. {
  23. echo Template::instance()->render('masterpage.tpl');
  24. }
  25. public function ESLStatus($f3)
  26. {
  27. $eslStatus = $this->findBoxCore->GetAllESLStatus();
  28. $f3->set('STATUS_BADGE_COLOR', [
  29. 'BLOCKED,FC' => 'info',
  30. 'OFFLINE' => 'warning',
  31. 'BLOCKED,FC' => 'danger',
  32. 'NO_STATUS' => 'light',
  33. 'OK' => 'success'
  34. ]);
  35. $f3->set('ESL_STATUS', $eslStatus);
  36. $f3->set('PAGENAME', 'Dashboard');
  37. $f3->set('CONTENT', 'labelstatus.tpl');
  38. echo Template::instance()->render('masterpage.tpl');
  39. }
  40. }