Example #1
0
 /**
  * Display a forum post in the relevant context.
  *
  * @param \mod_forum\output\forum_post $post The post to display.
  * @return string
  */
 public function render_forum_post_email(\mod_forum\output\forum_post_email $post)
 {
     $data = $post->export_for_template($this);
     return $this->render_from_template('mod_forum/' . $this->forum_post_template(), $data);
 }
Example #2
0
 /**
  * Display a forum post in the relevant context.
  *
  * @param \mod_forum\output\forum_post $post The post to display.
  * @return string
  */
 public function render_forum_post_email(\mod_forum\output\forum_post_email $post)
 {
     $data = $post->export_for_template($this, $this->target === RENDERER_TARGET_TEXTEMAIL);
     return $this->render_from_template('mod_forum/' . $this->forum_post_template(), $data);
 }