public function render() { $situazione = new StatoSensoriView($this->model->sensor); $programmi = new StatoSistemaView($this->model->program); $this->addData(['situazione' => $situazione->render(), 'programmazione' => $programmi->render()]); return parent::render(); }
public function render() { $stati = ['acceso' => 0, 'spento' => 0, 'indeterminato' => 0]; foreach ($this->model->result as $v) { if ($v === true) { $stati['acceso'] += $v['durata']; } else { if ($v === false) { $stati['spento'] += $v['durata']; } else { $stati['indeterminato'] += $v['durata']; } } } $commutazioni = ['elenco' => $this->model->result, 'totale' => $stati]; $this->addData(['commutazioni' => $commutazioni]); return parent::render(); }
public function render() { $this->addData(['sensori' => $this->model->list, 'antigelo' => $this->model->antifreezeTemp, 'manuale' => $this->model->manualTemp, 'santigelo' => $this->model->antifreezeSensor, 'smanuale' => $this->model->manualSensor, 'pin_rele' => $this->model->pinRele]); return parent::render(); }
public function render($directOutput = true) { parent::render($directOutput); }
public function render() { $this->addData(['sensori' => $this->model->get('listnoavg'), 'sensore' => $this->model->get('data')]); return parent::render(); }
$log = \file_get_contents($logfilename); $content .= "<pre>" . \htmlspecialchars($log) . "</pre>"; $content .= $tpl->render('foot'); header('Content-Type: text/html; charset=utf-8'); header('Content-Length: ' . strlen($content)); echo $content; break; default: $logger->error('Unknown action.'); $m->addLastInfoMessage('error', 'Error!'); // TODO Improve message $mainView = new MainView(); $mainView->render(); break; } // switch($action) } catch (\Exception $e) { $pageTitle = 'Microblog: Error'; $logger->error($e->__toString()); if (isset($m)) { if ($m->isLogin()) { $m->addLastInfoMessage('error', $e->getMessage()); } else { $m->addLastInfoMessage('error', 'Error!'); } $mainView = new MainView(); $mainView->render(); } else { echo "Error"; } }
public function render() { $this->addData(['commutazioni' => $this->renderSwitching()]); return parent::render(); }
public function render() { $this->addData(['programmi' => $this->model->list, 'programma' => $this->model, 'temperature' => isset($this->model->temperature) ? $this->model->temperature : null]); return parent::render(); }