IMP_Compose::_msgTextFormat PHP Method

_msgTextFormat() protected method

Determine text editor format.
protected _msgTextFormat ( array $opts, string $pref_name ) : array
$opts array Options (contains 'format' param).
$pref_name string The pref name that controls formatting.
return array Use HTML? and Force HTML?
    protected function _msgTextFormat($opts, $pref_name)
    {
        if (!empty($opts['format'])) {
            $compose_html = $force_html = $opts['format'] == 'html';
        } elseif ($GLOBALS['prefs']->getValue('compose_html')) {
            $compose_html = $force_html = true;
        } else {
            $compose_html = $GLOBALS['prefs']->getValue($pref_name);
            $force_html = false;
        }
        return array($compose_html, $force_html);
    }