CoolCMS API

PageText extends PageText
in package

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_system_page_texts'
#[TableAlias]
'pageText'

Table of Contents

Properties

$activeTranslation  : bool
$description  : string
$href  : string|null
$keywords  : string
$languageId  : int|null
$name  : string
$page  : TPage|null
$parent  : mixed
$text  : string|null
$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.
getDescription()  : string
getHref()  : string|null
getKeywords()  : string
getLanguageId()  : int|null
Translation language; null only for a new entity before `setLanguageId()`.
getName()  : string
getPage()  : TPage|null
getParent()  : object|null
getText()  : string|null
getTitle()  : string
isActiveTranslation()  : bool
setActiveTranslation()  : $this
setDescription()  : $this
setHref()  : $this
setKeywords()  : $this
setLanguageId()  : $this
setName()  : $this
setPage()  : $this
setParent()  : static
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'

$description

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

$href

protected string|null $href = null
Attributes
#[Column]
$name: 'href'
$type: 'string'
$length: 50
$nullable: true

$keywords

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

$languageId

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

$name

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

$parent

protected mixed $parent = null
Attributes
#[EntityOf]
\App\UI\Admin\System\Models\Entities\Page::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_system_pages_page_id'
$referencedColumnName: 'page_id'
#[ManyToOne]
$targetEntity: \App\UI\Admin\System\Models\Entities\Page::class
$inversedBy: 'translations'

$text

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

$title

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

Methods

__construct()

public __construct([int|null $languageId = null ][, mixed $page = null ][, string $name = '' ][, string $title = '' ][, string|null $text = null ][, string|null $href = null ][, string $description = '' ][, string $keywords = '' ][, bool $activeTranslation = true ]) : mixed
Parameters
$languageId : int|null = null
$page : mixed = null
$name : string = ''
$title : string = ''
$text : string|null = null
$href : string|null = null
$description : string = ''
$keywords : 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>

getDescription()

public getDescription() : string
Return values
string

getHref()

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

getKeywords()

public getKeywords() : string
Return values
string

getLanguageId()

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

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

getName()

public getName() : string
Return values
string

getPage()

public getPage() : TPage|null
Return values
TPage|null

getText()

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

getTitle()

public getTitle() : string
Return values
string

setActiveTranslation()

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

setDescription()

public setDescription(string $description) : $this
Parameters
$description : string
Return values
$this

setHref()

public setHref(string|null $href) : $this
Parameters
$href : string|null
Return values
$this

setKeywords()

public setKeywords(string $keywords) : $this
Parameters
$keywords : string
Return values
$this

setLanguageId()

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

setName()

public setName(string $name) : $this
Parameters
$name : string
Return values
$this

setPage()

public setPage(TPage|null $page) : $this
Parameters
$page : TPage|null
Return values
$this

setParent()

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

setText()

public setText(string|null $text) : $this
Parameters
$text : string|null
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