Path: blob/master/src/applications/metamta/view/PhabricatorMetaMTAMailSection.php
12256 views
<?php12/**3* Helper for building a rendered section.4*5* @task compose Composition6* @task render Rendering7* @group metamta8*/9final class PhabricatorMetaMTAMailSection extends Phobject {10private $plaintextFragments = array();11private $htmlFragments = array();1213public function getHTML() {14return $this->htmlFragments;15}1617public function getPlaintext() {18return implode("\n", $this->plaintextFragments);19}2021public function addHTMLFragment($fragment) {22$this->htmlFragments[] = $fragment;23return $this;24}2526public function addPlaintextFragment($fragment) {27$this->plaintextFragments[] = $fragment;28return $this;29}3031public function addFragment($fragment) {32$this->plaintextFragments[] = $fragment;33$this->htmlFragments[] =34phutil_escape_html_newlines(phutil_tag('div', array(), $fragment));3536return $this;37}38}394041