StageChangeNotification
readonly class \
Responsible for sending out emails when one or multiple records have been changed / sent to the next stage.
Relevant options are "tx_workspaces.emails.*" via userTS / pageTS.
Internal
This is a concrete implementation of sending out emails, and not part of the public TYPO3 Core API
Table of Contents
Methods
- __construct() : mixed
- notifyStageChange() : void
- Send an email notification to users in workspace in multiple languages, depending on each BE users' language preference.
- findFirstPageId() : int
- As it is possible that multiple elements are sent out, or multiple pages, the first "real" page ID is found.
- sendEmail() : void
- Send one email to a specific person, apply multi-language possibilities for sending this email out.
Methods
__construct()
public
__construct(StagesService $stagesService, PreviewUriBuilder $previewUriBuilder, MailerInterface $mailer, TemplatedEmailFactory $emailFactory, LoggerInterface $logger, TcaSchemaFactory $tcaSchemaFactory) : mixed
Parameters
- $stagesService : StagesService
- $previewUriBuilder : PreviewUriBuilder
- $mailer : MailerInterface
- $emailFactory : TemplatedEmailFactory
- $logger : LoggerInterface
- $tcaSchemaFactory : TcaSchemaFactory
notifyStageChange()
Send an email notification to users in workspace in multiple languages, depending on each BE users' language preference.
public
notifyStageChange(StageChangeMessage $message) : void
Parameters
- $message : StageChangeMessage
findFirstPageId()
As it is possible that multiple elements are sent out, or multiple pages, the first "real" page ID is found.
protected
findFirstPageId(string $elementTable, int $elementUid, array $elementRecord) : int
Parameters
- $elementTable : string
-
the table of the first element found
- $elementUid : int
-
the uid of the first element in the list
- $elementRecord : array
-
the full record
Return values
int —the corresponding page ID
sendEmail()
Send one email to a specific person, apply multi-language possibilities for sending this email out.
protected
sendEmail(array $recipientData, array $emailConfig, array $variablesForView) : void
Parameters
- $recipientData : array
- $emailConfig : array
- $variablesForView : array