QEmailTemplate
@quik/communication / QEmailTemplate
Abstract Class: QEmailTemplate<TParameters>
Defined in: communication/src/email/QEmailTemplate.ts:10
Base template helper used to render email content.
Extends
QTemplate<TParameters>
Type Parameters
TParameters
TParameters extends ObjectLiteral = ObjectLiteral
Type of the data passed to the template.
Constructors
Constructor
protectednew QEmailTemplate<TParameters>(templateName,subject,parameters?):QEmailTemplate<TParameters>
Defined in: communication/src/email/QEmailTemplate.ts:16
Parameters
templateName
string
Template identifier or path.
subject
string
Subject (translation key or plain text).
parameters?
TParameters
Optional parameters for the template.
Returns
QEmailTemplate<TParameters>
Overrides
QTemplate<TParameters>.constructor
Properties
_subject
protected_subject:string
Defined in: communication/src/email/QEmailTemplate.ts:21
Accessors
logger
Get Signature
get
protectedlogger():IQLogger
Defined in: core/src/QObject.ts:15
The logger getter for the object.
Returns
IQLogger
Inherited from
QTemplate.logger
name
Get Signature
get name():
string
Defined in: core/src/QObject.ts:8
Returns
string
Inherited from
QTemplate.name
parameters
Get Signature
get parameters():
TParameters
Defined in: templates/src/QTemplate.ts:40
Parameters that will be forwarded to the template.
Returns
TParameters
Set Signature
set parameters(
parameters):void
Defined in: templates/src/QTemplate.ts:47
Sets the parameters for the template.
Parameters
parameters
TParameters
Returns
void
Inherited from
QTemplate.parameters
subject
Get Signature
get subject():
string
Defined in: communication/src/email/QEmailTemplate.ts:24
Translated subject string.
Returns
string
Set Signature
set subject(
value):void
Defined in: communication/src/email/QEmailTemplate.ts:29
Sets the untranslated subject string.
Parameters
value
string
Returns
void
subjectRaw
Get Signature
get
protectedsubjectRaw():string
Defined in: communication/src/email/QEmailTemplate.ts:34
Returns the untranslated subject.
Returns
string
templateName
Get Signature
get templateName():
string
Defined in: templates/src/QTemplate.ts:28
Name of the template that will be rendered.
Returns
string
Set Signature
set templateName(
filename):void
Defined in: templates/src/QTemplate.ts:32
Parameters
filename
string
Returns
void
Inherited from
QTemplate.templateName
Methods
endSpan()
protectedendSpan(span):void
Defined in: core/src/QObject.ts:35
End a span returned by startSpan.
Parameters
span
TelemetrySpan
The span to end.
Returns
void
Inherited from
QTemplate.endSpan
recordSpanError()
protectedrecordSpanError(span,err):void
Defined in: core/src/QObject.ts:45
Record an exception on an active span.
Parameters
span
TelemetrySpan
The span to record the error on.
err
unknown
The error to record.
Returns
void
Inherited from
QTemplate.recordSpanError
render()
render():
string
Defined in: templates/src/QTemplate.ts:55
Renders the template using the provided parameters.
Returns
string
Inherited from
QTemplate.render
setSpanAttribute()
protectedsetSpanAttribute(span,key,value):void
Defined in: core/src/QObject.ts:64
Set a single attribute on an active span.
Parameters
span
TelemetrySpan
The span to update.
key
string
Attribute key.
value
string | number | boolean
Attribute value.
Returns
void
Inherited from
QTemplate.setSpanAttribute
startSpan()
protectedstartSpan(spanName,options?):TelemetrySpan
Defined in: core/src/QObject.ts:26
Start a telemetry span for the given operation name. Returns undefined when no telemetry provider is active.
Parameters
spanName
string
Name of the span.
options?
TelemetrySpanOptions
Optional span attributes and kind.
Returns
TelemetrySpan
Inherited from
QTemplate.startSpan