public function render($toString = false) { if (!$toString) { self::$engine->render(__DIR__ . '/default.latte', $this->getParameters()); } else { return self::$engine->renderToString(__DIR__ . '/default.latte', $this->getParameters()); } return ''; }
public function render($viewFile, $data, $return = false) { $latte = new Engine(); $latte->setTempDirectory('runtime'); if ($return) { return $latte->renderToString($viewFile, $data); } else { return $latte->render($viewFile, $data); } }
/** * Renders template to output. * @return void */ public function render($file = NULL, array $params = array()) { $this->latte->render($file ?: $this->file, $params + $this->params); }
/** * @param $template <directory>/<file>.latte convention (inside app/templates folder). * @param null $data * @return string rendered HTML */ function render($template, $data = null) { $this->latte->render(ROOT_DIR . "/app/templates/{$template}.latte", $data ? $data : $this->data); }