Template
extends TICEntity
in package
Uses
EntityTimestampable
Entité représentant un modèle de notification par email.
Tags
Table of Contents
Properties
- $bccAdmins : mixed
- $bccMore : mixed
- $bodyHtml : mixed
- $bodySms : mixed
- $bodyText : mixed
- $createdAt : mixed
- $enabled : mixed
- $isTimestampable : mixed
- Flag permettant de désactiver les actions des méthodes en prePersist et preSave
- $label : mixed
- $ref : mixed
- $return : mixed
- $sender : mixed
- $subject : mixed
- $target : mixed
- $translations : mixed
- $updatedAt : mixed
Methods
- __construct() : mixed
- __get() : mixed
- __isset() : bool
- __set() : void
- __toString() : mixed
- addTranslation() : Template
- Add translation
- createTimestampableValues() : void
- Actions automatiques si l'entité dispose de "@ORM\HasLifecycleCallbacks"
- doTimestampable() : bool
- Gestion de l'activation des actions en prePersist et preSave
- exportMail() : string
- Export des données de l'entité au format Mail/Mbox.
- getBccAdmins() : bool
- Get bccAdmins
- getBccMore() : string
- Get bccMore
- getBodyHtml() : string
- Get bodyHtml
- getBodySms() : string
- Get bodySms
- getBodyText() : string
- Get bodyText
- getContents() : array<string|int, mixed>
- Retourne la liste des contenus pour les 3 vues.
- getCreatedAt() : DateTimeInterface|null
- Get the creation date.
- getEnabled() : bool
- Get enabled
- getId() : string
- Get id
- getLabel() : string
- Get label
- getRef() : string
- Get ref
- getReturn() : string
- Get return
- getSender() : string
- Get sender
- getSubject() : string
- Get subject
- getTarget() : string
- Get target
- getTranslation() : TemplateTranslation
- Recherche l'instance TemplateTranslation associée pour la locale spécifiée.
- getTranslations() : Collection
- Get translations
- getUpdatedAt() : DateTimeInterface|null
- Get the modification date.
- import() : void
- Import des données de l'entité depuis un tableau associatif.
- isEmpty() : bool
- Test si le contenu text/html ET text/plain ET sms sont vides.
- listFormats() : array<string|int, mixed>
- Indique les formats (text/plain, text/html, sms) utilisés par ce modèle.
- removeTranslation() : mixed
- Remove translation
- setBccAdmins() : Template
- Set bccAdmins
- setBccMore() : Template
- Set bccMore
- setBodyHtml() : Template
- Set bodyHtml
- setBodySms() : Template
- Set bodySms
- setBodyText() : Template
- Set bodyText
- setCreatedAt() : self
- Set the creation date.
- setEnabled() : Template
- Set enabled
- setLabel() : Template
- Set label
- setRef() : Template
- Set ref
- setReturn() : Template
- Set return
- setSender() : Template
- Set sender
- setSubject() : Template
- Set subject
- setTarget() : Template
- Set target
- setUpdatedAt() : self
- Set the modification date.
- updateTimestampableValues() : void
- Actions automatiques si l'entité dispose de "@ORM\HasLifecycleCallbacks"
Properties
$bccAdmins
private
mixed
$bccAdmins
Tags
$bccMore
private
mixed
$bccMore
Tags
$bodyHtml
private
mixed
$bodyHtml
Tags
$bodySms
private
mixed
$bodySms
Tags
$bodyText
private
mixed
$bodyText
Tags
$createdAt
private
mixed
$createdAt
Tags
$enabled
private
mixed
$enabled
Tags
$isTimestampable
Flag permettant de désactiver les actions des méthodes en prePersist et preSave
private
mixed
$isTimestampable
= true
$label
private
mixed
$label
Tags
$ref
private
mixed
$ref
Tags
$return
private
mixed
$return
Tags
$sender
private
mixed
$sender
Tags
$subject
private
mixed
$subject
Tags
$target
private
mixed
$target
Tags
$translations
private
mixed
$translations
Tags
$updatedAt
private
mixed
$updatedAt
Tags
Methods
__construct()
public
__construct([string|null $ref = null ]) : mixed
Parameters
- $ref : string|null = null
__get()
public
__get(string $property) : mixed
Parameters
- $property : string
Tags
__isset()
public
__isset(string $property) : bool
Parameters
- $property : string
Return values
bool__set()
public
__set(string $property, mixed $value) : void
Parameters
- $property : string
- $value : mixed
Tags
__toString()
public
__toString() : mixed
addTranslation()
Add translation
public
addTranslation(TemplateTranslation $translation) : Template
Parameters
- $translation : TemplateTranslation
Return values
TemplatecreateTimestampableValues()
Actions automatiques si l'entité dispose de "@ORM\HasLifecycleCallbacks"
public
createTimestampableValues() : void
Tags
doTimestampable()
Gestion de l'activation des actions en prePersist et preSave
public
doTimestampable([bool $state = null ]) : bool
Parameters
- $state : bool = null
-
Nouvel état d'activation (true=actif / false=inactif)
Return values
bool —Retourne l'état d'activation en cours
exportMail()
Export des données de l'entité au format Mail/Mbox.
public
exportMail([string $locale = null ][, array<string|int, mixed> $formats = null ]) : string
(messages multipart MIME pour contenus text+html avec concaténation Mbox pour différentes locales)
Parameters
- $locale : string = null
- $formats : array<string|int, mixed> = null
Return values
stringgetBccAdmins()
Get bccAdmins
public
getBccAdmins() : bool
Return values
boolgetBccMore()
Get bccMore
public
getBccMore() : string
Return values
stringgetBodyHtml()
Get bodyHtml
public
getBodyHtml() : string
Return values
stringgetBodySms()
Get bodySms
public
getBodySms() : string
Return values
stringgetBodyText()
Get bodyText
public
getBodyText() : string
Return values
stringgetContents()
Retourne la liste des contenus pour les 3 vues.
public
getContents([string $locale = null ]) : array<string|int, mixed>
(utilisé pour initialiser un environnement Twig dans le service tic_mailer)
Parameters
- $locale : string = null
-
Langue souhaitée pour les modèles (optionnel)
Return values
array<string|int, mixed> —Contenus pour les clés 'subject', 'bodyText', 'bodyHtml' et 'bodySms'
getCreatedAt()
Get the creation date.
public
getCreatedAt() : DateTimeInterface|null
Return values
DateTimeInterface|nullgetEnabled()
Get enabled
public
getEnabled() : bool
Return values
boolgetId()
Get id
public
getId() : string
Return values
stringgetLabel()
Get label
public
getLabel() : string
Return values
stringgetRef()
Get ref
public
getRef() : string
Return values
stringgetReturn()
Get return
public
getReturn() : string
Return values
stringgetSender()
Get sender
public
getSender() : string
Return values
stringgetSubject()
Get subject
public
getSubject() : string
Return values
stringgetTarget()
Get target
public
getTarget() : string
Return values
stringgetTranslation()
Recherche l'instance TemplateTranslation associée pour la locale spécifiée.
public
getTranslation(string $locale) : TemplateTranslation
Parameters
- $locale : string
Return values
TemplateTranslation —ou null si aucune correspondance
getTranslations()
Get translations
public
getTranslations() : Collection
Return values
CollectiongetUpdatedAt()
Get the modification date.
public
getUpdatedAt() : DateTimeInterface|null
Return values
DateTimeInterface|nullimport()
Import des données de l'entité depuis un tableau associatif.
public
import(array<string|int, mixed> $messages) : void
Parameters
- $messages : array<string|int, mixed>
isEmpty()
Test si le contenu text/html ET text/plain ET sms sont vides.
public
isEmpty() : bool
Tags
Return values
boollistFormats()
Indique les formats (text/plain, text/html, sms) utilisés par ce modèle.
public
listFormats() : array<string|int, mixed>
Return values
array<string|int, mixed> —Liste pouvant contenir les indications : 'HTML', 'TEXT', 'SMS'
removeTranslation()
Remove translation
public
removeTranslation(TemplateTranslation $translation) : mixed
Parameters
- $translation : TemplateTranslation
setBccAdmins()
Set bccAdmins
public
setBccAdmins(bool $bccAdmins) : Template
Parameters
- $bccAdmins : bool
Return values
TemplatesetBccMore()
Set bccMore
public
setBccMore(string $bccMore) : Template
Parameters
- $bccMore : string
Return values
TemplatesetBodyHtml()
Set bodyHtml
public
setBodyHtml(string $bodyHtml) : Template
Parameters
- $bodyHtml : string
Return values
TemplatesetBodySms()
Set bodySms
public
setBodySms(string $bodySms) : Template
Parameters
- $bodySms : string
Return values
TemplatesetBodyText()
Set bodyText
public
setBodyText(string $bodyText) : Template
Parameters
- $bodyText : string
Return values
TemplatesetCreatedAt()
Set the creation date.
public
setCreatedAt(DateTimeInterface|null $createdAt) : self
Parameters
- $createdAt : DateTimeInterface|null
Return values
selfsetEnabled()
Set enabled
public
setEnabled(bool $enabled) : Template
Parameters
- $enabled : bool
Return values
TemplatesetLabel()
Set label
public
setLabel(string $label) : Template
Parameters
- $label : string
Return values
TemplatesetRef()
Set ref
public
setRef(string $ref) : Template
Parameters
- $ref : string
Return values
TemplatesetReturn()
Set return
public
setReturn(string $return) : Template
Parameters
- $return : string
Return values
TemplatesetSender()
Set sender
public
setSender(string $sender) : Template
Parameters
- $sender : string
Return values
TemplatesetSubject()
Set subject
public
setSubject(string $subject) : Template
Parameters
- $subject : string
Return values
TemplatesetTarget()
Set target
public
setTarget(string $target) : Template
Parameters
- $target : string
Return values
TemplatesetUpdatedAt()
Set the modification date.
public
setUpdatedAt(DateTimeInterface|null $updatedAt) : self
Parameters
- $updatedAt : DateTimeInterface|null
Return values
selfupdateTimestampableValues()
Actions automatiques si l'entité dispose de "@ORM\HasLifecycleCallbacks"
public
updateTimestampableValues() : void