StageChangeNotification implements LoggerAwareInterface uses LoggerAwareTrait

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

Interfaces

LoggerAwareInterface

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

notifyStageChange()

Send an email notification to users in workspace in multiple languages, depending on each BE users' language preference.

public notifyStageChange(array<string|int, mixed> $workspaceRecord, int $stageId, array<string|int, mixed> $affectedElements, string $comment, array<string|int, mixed> $recipients, array<string|int, mixed> $currentUser) : void
Parameters
$workspaceRecord : array<string|int, mixed>
$stageId : int

Next Stage Number

$affectedElements : array<string|int, mixed>

List of element names (table / uid pairs)

$comment : string

User comment sent along with action

$recipients : array<string|int, mixed>

List of recipients to notify, list is generated by workspace extension module

$currentUser : array<string|int, mixed>

array of the be_users row

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<string|int, mixed> $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<string|int, mixed>

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<string|int, mixed> $recipientData, array<string|int, mixed> $emailConfig, array<string|int, mixed> $variablesForView) : void
Parameters
$recipientData : array<string|int, mixed>
$emailConfig : array<string|int, mixed>
$variablesForView : array<string|int, mixed>

        
On this page

Search results