private function GetConfirmMessage()
 {
     $replacements = array();
     $replacements['Text1'] = $this->register->GetMailText1();
     $replacements['Text2'] = $this->register->GetMailText2();
     $replacements['Title'] = Html($this->register->GetMailSubject());
     $replacements['Styles'] = Html($this->register->GetMailStyles());
     $confirmUrl = $this->register->GetConfirmUrl();
     if ($confirmUrl) {
         $replacements['ConfirmUrl'] = Html(Confirmer::CalcUrl($this->member, $confirmUrl));
     }
     $template = Path::Combine(PathUtil::BundleFolder($this->MyBundle()), 'MailTemplates/Confirm.phtml');
     $parser = new TemplateParser($replacements);
     return $parser->Parse($template);
 }
 protected function RenderWordingFields($noFieldset = false)
 {
     $result = '';
     $wordings = $this->Wordings();
     if (count($wordings) == 0) {
         return $result;
     }
     if (!$noFieldset) {
         $legend = Html(Trans('Core.ContentForm.Legend.Wordings'));
         $result .= "<fieldset><legend>{$legend}</legend>";
     }
     $result .= '<div id="wording-table">';
     foreach ($this->Wordings() as $name) {
         $result .= '<div class="wording-row">';
         $result .= $this->RenderElement($this->WordingFieldName($name));
         $result .= '</div>';
     }
     $result .= '</div>';
     if (!$noFieldset) {
         $result .= '</fieldset>';
     }
     return $result;
 }
Exemple #3
0
/**
 * Escapes special chars and echoes the string
 * @param string $string The input string
 * @param HtmlQuoteMode $mode The Quote Mode
 */
function HtmlOut($string, HtmlQuoteMode $mode = null)
{
    echo Html($string, $mode);
}
Exemple #4
0
 private function ApplyFilters(array $filters, $value)
 {
     $isRaw = false;
     foreach ($filters as $filter) {
         if ($filter == 'raw') {
             $isRaw = true;
             continue;
         }
         if (!function_exists($filter)) {
             throw new \Exception(Trans('Core.Replacer.Error.FilterNotFound.Name_{0}', $filter));
         }
         $value = $filter($value);
     }
     return $isRaw ? $value : Html($value);
 }