EmailTemplate::plainTextEmail PHP Méthode

plainTextEmail() protected méthode

Renders a plaintext email.
protected plainTextEmail ( ) : string
Résultat string A plaintext email.
    protected function plainTextEmail()
    {
        $email = ['banner' => val('alt', $this->image) . ' ' . val('link', $this->image), 'title' => $this->getTitle(), 'lead' => $this->getLead(), 'message' => $this->getMessage(), 'button' => sprintf(t('%s: %s'), val('text', $this->button), val('url', $this->button)), 'footer' => $this->getFooter()];
        foreach ($email as $key => $val) {
            if (!$val) {
                unset($email[$key]);
            } else {
                if ($key == 'message') {
                    $email[$key] = "<br>{$val}<br>";
                }
            }
        }
        return Gdn_Format::plainText(Gdn_Format::text(implode('<br>', $email), false));
    }