CoolCMS API

Page extends Page
in package

Tags
extends
Attributes
#[Entity]
#[Table]
$name: "cms_system_pages"
#[TableAlias]
'page'

Table of Contents

Properties

$changefreq  : string
$comments  : string|null
$component  : string|null
$css  : string
$frontpage  : bool
$htmlClass  : string|null
$id  : int|null
$insertTime  : DateTime
$layout  : string
$level  : int
$lft  : int
$logged  : bool
$loggedLayout  : string|null
$parentId  : int|null
$priority  : string|null
$rgt  : int
$routes  : Collection
$showInSitemap  : bool
$showTitle  : bool
$translations  : Collection
$updateDatetime  : DateTime|null

Methods

__construct()  : mixed
addRoute()  : $this
addTranslation()  : $this
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
clearRoutes()  : $this
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getChangefreq()  : string
getComments()  : string|null
getComponent()  : string|null
getCss()  : string
getFrontpage()  : bool
getHtmlClass()  : string|null
getId()  : int|null
getInsertTime()  : DateTime
getLayout()  : string
getLevel()  : int
getLft()  : int
getLogged()  : bool
getLoggedLayout()  : string|null
getParentId()  : int|null
getPriority()  : string|null
getRgt()  : int
getRoute()  : TRoute|null
getRoutes()  : Collection<int, TRoute>
getShowInSitemap()  : bool
getShowTitle()  : bool
getTranslation()  : TTranslation|null
getTranslations()  : Collection<int, TTranslation>
getUpdateDatetime()  : DateTime|null
isFrontpage()  : bool
isLogged()  : bool
isOnlyForLoggedInUsers()  : bool
isPersisted()  : bool
isShowInSitemap()  : bool
isShowTitle()  : bool
removeRoute()  : $this
removeTranslation()  : $this
routeCollectionInit()  : void
setChangefreq()  : $this
setComments()  : $this
setComponent()  : $this
setCss()  : $this
setFrontpage()  : $this
setHtmlClass()  : $this
setId()  : $this
setInsertTime()  : $this
setLayout()  : $this
setLevel()  : $this
setLft()  : $this
setLogged()  : $this
setLoggedLayout()  : $this
setParentId()  : $this
setPriority()  : $this
setRgt()  : $this
setRoutes()  : $this
setShowInSitemap()  : $this
setShowTitle()  : $this
setTranslations()  : $this
setUpdateDatetime()  : $this
translationCollectionInit()  : void
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$changefreq

protected string $changefreq = 'monthly'
Attributes
#[Column]
$name: 'changefreq'
$type: 'string'
$length: 10

$comments

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

$component

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

$css

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

$frontpage

protected bool $frontpage = false
Attributes
#[Column]
$name: 'frontpage'
$type: 'boolean'

$htmlClass

protected string|null $htmlClass = null
Attributes
#[Column]
$name: 'html_class'
$type: 'string'
$length: 255
$nullable: true

$id

protected int|null $id = null
Attributes
#[Column]
$name: 'page_id'
$type: 'integer'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$insertTime

protected DateTime $insertTime = new DateTime()
Attributes
#[Column]
$name: 'insert_time'
$type: 'datetime'
#[ExternalReadonly]

$layout

protected string $layout = 'page.php'
Attributes
#[Column]
$name: 'layout'
$type: 'string'
$length: 50

$level

protected int $level = 1
Attributes
#[Column]
$name: 'level'
$type: 'smallint'
$options: ['unsigned' => true]

$lft

protected int $lft = 0
Attributes
#[Column]
$name: 'lft'
$type: 'integer'
$options: ['unsigned' => true]

$logged

protected bool $logged = false
Attributes
#[Column]
$name: 'logged'
$type: 'boolean'

$loggedLayout

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

$parentId

protected int|null $parentId = null
Attributes
#[Column]
$name: 'parent_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$priority

protected string|null $priority = '1.0'
Attributes
#[Column]
$name: 'priority'
$type: 'decimal'
$precision: 2
$scale: 1
$nullable: true

$rgt

protected int $rgt = 0
Attributes
#[Column]
$name: 'rgt'
$type: 'integer'
$options: ['unsigned' => true]

$routes

protected Collection $routes
Attributes
#[CollectionOf]
\App\UI\Front\System\Models\Entities\Route::class
#[InverseJoinColumn]
$name: 'cms_system_routes_route_id'
$referencedColumnName: 'route_id'
#[JoinColumn]
$name: 'cms_system_pages_page_id'
$referencedColumnName: 'page_id'
#[JoinTable]
$name: 'cms_system_page_route_rel'
#[ManyToMany]
$targetEntity: \App\UI\Front\System\Models\Entities\Route::class
$inversedBy: 'pages'
$fetch: "LAZY"

$showInSitemap

protected bool $showInSitemap = true
Attributes
#[Column]
$name: 'show_in_sitemap'
$type: 'boolean'

$showTitle

protected bool $showTitle = true
Attributes
#[Column]
$name: 'show_title'
$type: 'boolean'

$translations

protected Collection $translations
Attributes
#[CollectionOf]
\App\UI\Front\System\Models\Entities\PageText::class
$owned: true
#[OneToMany]
$targetEntity: \App\UI\Front\System\Models\Entities\PageText::class
$mappedBy: "parent"
$cascade: ["persist", "remove"]
$orphanRemoval: true

$updateDatetime

protected DateTime|null $updateDatetime = null
Attributes
#[Column]
$name: 'update_datetime'
$type: 'datetime'
$nullable: true
#[ExternalReadonly]

Methods

__construct()

public __construct([int|null $id = null ][, string|null $component = null ][, string $layout = 'page.php' ][, string|null $loggedLayout = null ][, string $css = '' ][, DateTime|null $updateDatetime = null ][, DateTime $insertTime = new DateTime() ][, int|null $parentId = null ][, int $lft = 0 ][, int $rgt = 0 ][, int $level = 1 ][, bool $frontpage = false ][, bool $logged = false ][, bool $showTitle = true ][, bool $showInSitemap = true ][, string $changefreq = 'monthly' ][, string|null $priority = '1.0' ][, string|null $comments = null ][, string|null $htmlClass = null ][, Collection $translations = new ArrayCollection() ][, Collection $routes = new ArrayCollection() ]) : mixed
Parameters
$id : int|null = null
$component : string|null = null
$layout : string = 'page.php'
$loggedLayout : string|null = null
$css : string = ''
$updateDatetime : DateTime|null = null
$insertTime : DateTime = new DateTime()
$parentId : int|null = null
$lft : int = 0
$rgt : int = 0
$level : int = 1
$frontpage : bool = false
$logged : bool = false
$showTitle : bool = true
$showInSitemap : bool = true
$changefreq : string = 'monthly'
$priority : string|null = '1.0'
$comments : string|null = null
$htmlClass : string|null = null
$translations : Collection = new ArrayCollection()
$routes : Collection = new ArrayCollection()

addRoute()

public addRoute(TRoute $route) : $this
Parameters
$route : TRoute
Return values
$this

addTranslation()

public addTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

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>

getChangefreq()

public getChangefreq() : string
Return values
string

getComments()

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

getComponent()

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

getCss()

public getCss() : string
Return values
string

getFrontpage()

public getFrontpage() : bool
Return values
bool

getHtmlClass()

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

getInsertTime()

public getInsertTime() : DateTime
Return values
DateTime

getLayout()

public getLayout() : string
Return values
string

getLevel()

public getLevel() : int
Return values
int

getLft()

public getLft() : int
Return values
int

getLogged()

public getLogged() : bool
Return values
bool

getLoggedLayout()

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

getParentId()

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

getPriority()

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

getRgt()

public getRgt() : int
Return values
int

getRoute()

public getRoute(int $routeId) : TRoute|null
Parameters
$routeId : int
Return values
TRoute|null

getRoutes()

public getRoutes() : Collection<int, TRoute>
Return values
Collection<int, TRoute>

getShowInSitemap()

public getShowInSitemap() : bool
Return values
bool

getShowTitle()

public getShowTitle() : bool
Return values
bool

getTranslation()

public getTranslation(int $langId) : TTranslation|null
Parameters
$langId : int
Return values
TTranslation|null

getTranslations()

public getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>

getUpdateDatetime()

public getUpdateDatetime() : DateTime|null
Return values
DateTime|null

isFrontpage()

public isFrontpage() : bool
Return values
bool

isLogged()

public isLogged() : bool
Return values
bool

isOnlyForLoggedInUsers()

public isOnlyForLoggedInUsers() : bool
Return values
bool

isShowInSitemap()

public isShowInSitemap() : bool
Return values
bool

isShowTitle()

public isShowTitle() : bool
Return values
bool

removeRoute()

public removeRoute(TRoute $route) : $this
Parameters
$route : TRoute
Return values
$this

removeTranslation()

public removeTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

setChangefreq()

public setChangefreq(string $changefreq) : $this
Parameters
$changefreq : string
Return values
$this

setComments()

public setComments(string|null $comments) : $this
Parameters
$comments : string|null
Return values
$this

setComponent()

public setComponent(string|null $component) : $this
Parameters
$component : string|null
Return values
$this

setCss()

public setCss(string $css) : $this
Parameters
$css : string
Return values
$this

setFrontpage()

public setFrontpage(bool $frontpage) : $this
Parameters
$frontpage : bool
Return values
$this

setHtmlClass()

public setHtmlClass(string|null $htmlClass) : $this
Parameters
$htmlClass : string|null
Return values
$this

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
Return values
$this

setInsertTime()

public setInsertTime(DateTime $dt) : $this
Parameters
$dt : DateTime
Return values
$this

setLayout()

public setLayout(string $layout) : $this
Parameters
$layout : string
Return values
$this

setLevel()

public setLevel(int $level) : $this
Parameters
$level : int
Return values
$this

setLft()

public setLft(int $lft) : $this
Parameters
$lft : int
Return values
$this

setLogged()

public setLogged(bool $logged) : $this
Parameters
$logged : bool
Return values
$this

setLoggedLayout()

public setLoggedLayout(string|null $loggedLayout) : $this
Parameters
$loggedLayout : string|null
Return values
$this

setParentId()

public setParentId(int|null $parentId) : $this
Parameters
$parentId : int|null
Return values
$this

setPriority()

public setPriority(string|null $priority) : $this
Parameters
$priority : string|null
Return values
$this

setRgt()

public setRgt(int $rgt) : $this
Parameters
$rgt : int
Return values
$this

setRoutes()

public setRoutes(Collection<int, TRoute>|array<int, TRoute> $routes) : $this
Parameters
$routes : Collection<int, TRoute>|array<int, TRoute>
Return values
$this

setShowInSitemap()

public setShowInSitemap(bool $showInSitemap) : $this
Parameters
$showInSitemap : bool
Return values
$this

setShowTitle()

public setShowTitle(bool $showTitle) : $this
Parameters
$showTitle : bool
Return values
$this

setTranslations()

public setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
$translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$this

setUpdateDatetime()

public setUpdateDatetime(DateTime|null $dt) : $this
Parameters
$dt : DateTime|null
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