ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\Mail\Mime\Presentation\ConfiguredMailBodyComposer Class Reference

Composes the body in whichever format the installation is configured to send. More...

+ Inheritance diagram for ILIAS\Mail\Mime\Presentation\ConfiguredMailBodyComposer:
+ Collaboration diagram for ILIAS\Mail\Mime\Presentation\ConfiguredMailBodyComposer:

Public Member Functions

 __construct (private ilSetting $settings, private Closure $html_composer, private MailBodyComposer $plain_text_composer)
 
 compose (MailBodySource $source)
 
 compose (MailBodySource $source)
 

Detailed Description

Composes the body in whichever format the installation is configured to send.

Definition at line 29 of file ConfiguredMailBodyComposer.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Mail\Mime\Presentation\ConfiguredMailBodyComposer::__construct ( private ilSetting  $settings,
private Closure  $html_composer,
private MailBodyComposer  $plain_text_composer 
)
Parameters
Closure()MailBodyComposer $html_composer Composing HTML requires the UI service and a look at the installation title, so the composer is only ever built for HTML delivery.

Definition at line 36 of file ConfiguredMailBodyComposer.php.

40 {
41 }

Member Function Documentation

◆ compose()

ILIAS\Mail\Mime\Presentation\ConfiguredMailBodyComposer::compose ( MailBodySource  $source)

Implements ILIAS\Mail\Mime\Presentation\MailBodyComposer.

Definition at line 43 of file ConfiguredMailBodyComposer.php.

43 : ComposedMailBody
44 {
45 if ($this->settings->get('mail_send_html', '0')) {
46 return ($this->html_composer)()->compose($source);
47 }
48
49 return $this->plain_text_composer->compose($source);
50 }

References ILIAS\Mail\Mime\Presentation\ConfiguredMailBodyComposer\compose(), and ILIAS\Repository\settings().

Referenced by ILIAS\Mail\Mime\Presentation\ConfiguredMailBodyComposer\compose().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: