/**
  * Renders the body of the email.
  *
  * @param WorkingDay $day
  * @return string the body.
  */
 public function renderBody(WorkingDay $day)
 {
     $template = $this->templateEngine->compileFile($this->templateFile);
     $tasks = $this->formatTasks($day);
     $output = $this->templateEngine->renderTemplate($template, ['tasks' => $tasks]);
     return $output;
 }
Example #2
0
 public function render($view, $file, $params)
 {
     $template = $this->dust->compileFile($file);
     $vars = ['view' => $view] + $params;
     return $this->dust->renderTemplate($template, $vars);
 }