src/Helpers/Mailer.php
protected function getSupportMessages(Result $result)
    {
        $messages = array(
            'text' => '',
            'html' => '',
        );

        $pluginSettings = $this->config->getPluginSettings();
        // We add the request and response messages when set so or if there were
        // warnings or severer messages, thus not with notices.
        $addReqResp = $pluginSettings['debug'] === PluginConfig::Send_SendAndMailOnError ? Result::AddReqResp_WithOther : Result::AddReqResp_Always;
        if ($addReqResp === Result::AddReqResp_Always || ($addReqResp === Result::AddReqResp_WithOther && $result->getStatus() >= Result::Status_Warnings)) {
            if ($result->getRawRequest() !== null || $result->getRawResponse() !== null) {
                $header = $this->t('mail_support_header');
                $description = $this->t('mail_support_desc');
                $supportMessagesText = $result->getRawRequestResponse(Result::Format_FormattedText);
                $supportMessagesHtml = $result->getRawRequestResponse(Result::Format_Html);
                $messages = array(
                    'text' => "\n$header\n\n$description\n\n$supportMessagesText\n",
                    'html' => "<details><summary>$header</summary><p>$description</p>$supportMessagesHtml</details>",
                );
            }
        }
        return $messages;
    }
protected function getSupportMessages(Result $result)
    {
        $messages = array(
            'text' => '',
            'html' => '',
        );

        $pluginSettings = $this->config->getPluginSettings();
        // We add the request and response messages when set so or if there were
        // warnings or severer messages, thus not with notices.
        $addReqResp = $pluginSettings['debug'] === PluginConfig::Send_SendAndMailOnError ? Result::AddReqResp_WithOther : Result::AddReqResp_Always;
        if ($addReqResp === Result::AddReqResp_Always || ($addReqResp === Result::AddReqResp_WithOther && $result->getStatus() >= Result::Status_Warnings)) {
            if ($result->getRawRequest() !== null || $result->getRawResponse() !== null) {
                $header = $this->t('mail_support_header');
                $description = $this->t('mail_support_desc');
                $supportMessagesText = $result->getRawRequestResponse(Result::Format_FormattedText);
                $supportMessagesHtml = $result->getRawRequestResponse(Result::Format_Html);
                $messages = array(
                    'text' => "\n$header\n\n$description\n\n$supportMessagesText\n",
                    'html' => "<details><summary>$header</summary><p>$description</p>$supportMessagesHtml</details>",
                );
            }
        }
        return $messages;
    }
protected function getSupportMessages ( Result $ result ) { $ messages = array ( 'text' => '' , 'html' => '' , ) ; $ pluginSettings = $ this -> config -> getPluginSettings ( ) ; // We add the request and response messages when set so or if there were // warnings or severer messages, thus not with notices. $ addReqResp = $ pluginSettings [ 'debug' ] === PluginConfig :: Send_SendAndMailOnError ? Result :: AddReqResp_WithOther : Result :: AddReqResp_Always ; if ( $ addReqResp === Result :: AddReqResp_Always || ( $ addReqResp === Result :: AddReqResp_WithOther && $ result -> getStatus ( ) >= Result :: Status_Warnings ) ) { if ( $ result -> getRawRequest ( ) !== null || $ result -> getRawResponse ( ) !== null ) { $ header = $ this -> t ( 'mail_support_header' ) ; $ description = $ this -> t ( 'mail_support_desc' ) ; $ supportMessagesText = $ result -> getRawRequestResponse ( Result :: Format_FormattedText ) ; $ supportMessagesHtml = $ result -> getRawRequestResponse ( Result :: Format_Html ) ; $ messages = array ( 'text' => "\n$header\n\n$description\n\n$supportMessagesText\n" , 'html' => "<details><summary>$header</summary><p>$description</p>$supportMessagesHtml</details>" , ) ; } } return $ messages ; }
Returns the support messages along with some descriptive text.

@param \Siel\Acumulus\Invoice\Result $result

@return string[]
An array with a plain text (key='text') and an html string (key='html')
containing the support messages with some descriptive text.
Returns the support messages along with some descriptive text .