CoolCMS API

NewsText extends NewsText
in package

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_blog_news_texts'
#[TableAlias]
'newsText'

Table of Contents

Properties

$activeTranslation  : bool
$languageId  : int|null
$news  : TNews|null
$parent  : mixed
$perex  : string|null
$text  : string
$title  : 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.
getLanguageId()  : int|null
Translation language; null only for a new entity before `setLanguageId()`.
getNews()  : TNews|null
getParent()  : object|null
getPerex()  : string|null
getText()  : string
getTitle()  : string
isActiveTranslation()  : bool
setActiveTranslation()  : $this
setLanguageId()  : $this
setNews()  : $this
setParent()  : static
setPerex()  : $this
setText()  : $this
setTitle()  : $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'

$languageId

protected int|null $languageId = null
Attributes
#[Column]
$name: 'cms_system_languages_language_id'
$type: 'integer'
$options: ['unsigned' => true]
#[Id]
#[Identity]

$parent

protected mixed $parent = null
Attributes
#[EntityOf]
\App\UI\Admin\Blog\Models\Entities\News::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_mod_blog_news_news_id'
$referencedColumnName: 'news_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Blog\Models\Entities\News::class
$inversedBy: 'translations'

$perex

protected string|null $perex = null
Attributes
#[Column]
$name: 'perex'
$type: 'text'
$nullable: true

$text

protected string $text = ''
Attributes
#[Column]
$name: 'text'
$type: 'text'
$length: 16777215

$title

protected string $title = ''
Attributes
#[Column]
$name: 'title'
$type: 'string'
$length: 150

Methods

__construct()

public __construct([mixed $news = null ][, int|null $languageId = null ][, string $title = '' ][, string|null $perex = null ][, string $text = '' ][, bool $activeTranslation = true ]) : mixed
Parameters
$news : mixed = null
$languageId : int|null = null
$title : string = ''
$perex : string|null = null
$text : string = ''
$activeTranslation : bool = true

callInitMethods()

Calls `init{TraitName}()` for every used trait that defines such a method.

public callInitMethods() : void

getAllTraits()

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>

getLanguageId()

Translation language; null only for a new entity before `setLanguageId()`.

public getLanguageId() : int|null
Return values
int|null

getNews()

public getNews() : TNews|null
Return values
TNews|null

getPerex()

public getPerex() : string|null
Return values
string|null

getText()

public getText() : string
Return values
string

getTitle()

public getTitle() : string
Return values
string

setActiveTranslation()

public setActiveTranslation(bool $activeTranslation) : $this
Parameters
$activeTranslation : bool
Return values
$this

setLanguageId()

public setLanguageId(int $languageId) : $this
Parameters
$languageId : int
Return values
$this

setNews()

public setNews(TNews|null $news) : $this
Parameters
$news : TNews|null
Return values
$this

setParent()

public setParent(object|null $parent) : static
Parameters
$parent : object|null
Return values
static

setPerex()

public setPerex(string|null $perex) : $this
Parameters
$perex : string|null
Return values
$this

setText()

public setText(string $text) : $this
Parameters
$text : string
Return values
$this

setTitle()

public setTitle(string $title) : $this
Parameters
$title : string
Return values
$this

getTraitsRecursive()

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>
Return values
array<string, string>
On this page

Search results