NewsletterText
extends NewsletterText
in package
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_base_newsletter_texts'
- #[TableAlias]
- 'newsletterText'
Table of Contents
Properties
- $activeTranslation : bool
- $body : string
- $languageId : int|null
- $newsletter : TNewsletter|null
- $parent : mixed
- $subject : string
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getActiveTranslation() : bool
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getBody() : string
- getLanguageId() : int|null
- Translation language; null only for a new entity before `setLanguageId()`.
- getNewsletter() : TNewsletter|null
- getParent() : object|null
- getSubject() : string
- isActiveTranslation() : bool
- setActiveTranslation() : $this
- setBody() : $this
- setLanguageId() : $this
- setNewsletter() : $this
- setParent() : static
- setSubject() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$activeTranslation
protected
bool
$activeTranslation
= true
Attributes
- #[Column]
- $name: 'active_translation'
- $type: 'boolean'
$body
protected
string
$body
= ''
Attributes
- #[Column]
- $name: 'body'
- $type: 'text'
- $length: 16777215
$languageId
protected
int|null
$languageId
= null
Attributes
- #[Column]
- $type: 'integer'
- $name: 'cms_system_languages_language_id'
- $options: ['unsigned' => true]
- #[Id]
- #[Identity]
$newsletter
protected
TNewsletter|null
$newsletter
= null
Attributes
- #[Transient]
$parent
protected
mixed
$parent
= null
Attributes
- #[EntityOf]
- \App\UI\Admin\Base\Models\Entities\Newsletter::class
- #[Id]
- #[Identity]
- #[JoinColumn]
- $name: 'cms_mod_base_newsletters_newsletter_id'
- $referencedColumnName: 'newsletter_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Admin\Base\Models\Entities\Newsletter::class
- $inversedBy: 'translations'
$subject
protected
string
$subject
= ''
Attributes
- #[Column]
- $name: 'subject'
- $type: 'string'
- $length: 255
Methods
__construct()
public
__construct([int|null $languageId = null ][, mixed $newsletter = null ][, string $subject = '' ][, string $body = '' ][, bool $activeTranslation = true ]) : mixed
Parameters
- $languageId : int|null = null
- $newsletter : mixed = null
- $subject : string = ''
- $body : string = ''
- $activeTranslation : bool = true
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getActiveTranslation()
public
getActiveTranslation() : bool
Return values
boolgetAllTraits()
Returns all traits the class uses, including those used by parent classes and nested traits.
public
getAllTraits() : array<string, string>
Return values
array<string, string>getBody()
public
getBody() : string
Return values
stringgetLanguageId()
Translation language; null only for a new entity before `setLanguageId()`.
public
getLanguageId() : int|null
Return values
int|nullgetNewsletter()
public
getNewsletter() : TNewsletter|null
Return values
TNewsletter|nullgetParent()
public
getParent() : object|null
Return values
object|nullgetSubject()
public
getSubject() : string
Return values
stringisActiveTranslation()
public
isActiveTranslation() : bool
Return values
boolsetActiveTranslation()
public
setActiveTranslation(bool $activeTranslation) : $this
Parameters
- $activeTranslation : bool
Return values
$thissetBody()
public
setBody(string $b) : $this
Parameters
- $b : string
Return values
$thissetLanguageId()
public
setLanguageId(int $languageId) : $this
Parameters
- $languageId : int
Return values
$thissetNewsletter()
public
setNewsletter(TNewsletter|null $newsletter) : $this
Parameters
- $newsletter : TNewsletter|null
Return values
$thissetParent()
public
setParent(object|null $parent) : static
Parameters
- $parent : object|null
Return values
staticsetSubject()
public
setSubject(string $s) : $this
Parameters
- $s : string
Return values
$thisgetTraitsRecursive()
Walks the trait list recursively and collects nested traits too.
private
static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
- $traits : array<string, string>