Page
extends Page
in package
Admin variant of a front end page (`cms_system_pages`), hydrated from the Api endpoint `api/system/page` via `ApiBridge`.
Maps translations and the many-to-many association to routes (routes), which the admin form
assigns through the route multiselect. routes is the owning, unidirectional side (join
table cms_system_page_route_rel, no inversedBy); the admin Route does not map the
back-reference pages.
Tags
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'
$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\Admin\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\Admin\System\Models\Entities\Route::class
- $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\Admin\System\Models\Entities\PageText::class
- $owned: true
- #[OneToMany]
- $targetEntity: \App\UI\Admin\System\Models\Entities\PageText::class
- $mappedBy: 'parent'
- $cascade: ["persist", "remove"]
- $orphanRemoval: true
- $fetch: "LAZY"
$updateDatetime
protected
DateTime|null
$updateDatetime
= null
Attributes
- #[Column]
- $name: 'update_datetime'
- $type: 'datetime'
- $nullable: true
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
$thisaddTranslation()
public
addTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thiscallInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
clearRoutes()
public
clearRoutes() : $this
Return values
$thisgetAllTraits()
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
stringgetComments()
public
getComments() : string|null
Return values
string|nullgetComponent()
public
getComponent() : string|null
Return values
string|nullgetCss()
public
getCss() : string
Return values
stringgetFrontpage()
public
getFrontpage() : bool
Return values
boolgetHtmlClass()
public
getHtmlClass() : string|null
Return values
string|nullgetId()
public
getId() : int|null
Return values
int|nullgetInsertTime()
public
getInsertTime() : DateTime
Return values
DateTimegetLayout()
public
getLayout() : string
Return values
stringgetLevel()
public
getLevel() : int
Return values
intgetLft()
public
getLft() : int
Return values
intgetLogged()
public
getLogged() : bool
Return values
boolgetLoggedLayout()
public
getLoggedLayout() : string|null
Return values
string|nullgetParentId()
public
getParentId() : int|null
Return values
int|nullgetPriority()
public
getPriority() : string|null
Return values
string|nullgetRgt()
public
getRgt() : int
Return values
intgetRoute()
public
getRoute(int $routeId) : TRoute|null
Parameters
- $routeId : int
Return values
TRoute|nullgetRoutes()
public
getRoutes() : Collection<int, TRoute>
Return values
Collection<int, TRoute>getShowInSitemap()
public
getShowInSitemap() : bool
Return values
boolgetShowTitle()
public
getShowTitle() : bool
Return values
boolgetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>getUpdateDatetime()
public
getUpdateDatetime() : DateTime|null
Return values
DateTime|nullisFrontpage()
public
isFrontpage() : bool
Return values
boolisLogged()
public
isLogged() : bool
Return values
boolisOnlyForLoggedInUsers()
public
isOnlyForLoggedInUsers() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolisShowInSitemap()
public
isShowInSitemap() : bool
Return values
boolisShowTitle()
public
isShowTitle() : bool
Return values
boolremoveRoute()
public
removeRoute(TRoute $route) : $this
Parameters
- $route : TRoute
Return values
$thisremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thisrouteCollectionInit()
public
routeCollectionInit() : void
setChangefreq()
public
setChangefreq(string $changefreq) : $this
Parameters
- $changefreq : string
Return values
$thissetComments()
public
setComments(string|null $comments) : $this
Parameters
- $comments : string|null
Return values
$thissetComponent()
public
setComponent(string|null $component) : $this
Parameters
- $component : string|null
Return values
$thissetCss()
public
setCss(string $css) : $this
Parameters
- $css : string
Return values
$thissetFrontpage()
public
setFrontpage(bool $frontpage) : $this
Parameters
- $frontpage : bool
Return values
$thissetHtmlClass()
public
setHtmlClass(string|null $htmlClass) : $this
Parameters
- $htmlClass : string|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetInsertTime()
public
setInsertTime(DateTime $dt) : $this
Parameters
- $dt : DateTime
Return values
$thissetLayout()
public
setLayout(string $layout) : $this
Parameters
- $layout : string
Return values
$thissetLevel()
public
setLevel(int $level) : $this
Parameters
- $level : int
Return values
$thissetLft()
public
setLft(int $lft) : $this
Parameters
- $lft : int
Return values
$thissetLogged()
public
setLogged(bool $logged) : $this
Parameters
- $logged : bool
Return values
$thissetLoggedLayout()
public
setLoggedLayout(string|null $loggedLayout) : $this
Parameters
- $loggedLayout : string|null
Return values
$thissetParentId()
public
setParentId(int|null $parentId) : $this
Parameters
- $parentId : int|null
Return values
$thissetPriority()
public
setPriority(string|null $priority) : $this
Parameters
- $priority : string|null
Return values
$thissetRgt()
public
setRgt(int $rgt) : $this
Parameters
- $rgt : int
Return values
$thissetRoutes()
public
setRoutes(Collection<int, TRoute>|array<int, TRoute> $routes) : $this
Parameters
- $routes : Collection<int, TRoute>|array<int, TRoute>
Return values
$thissetShowInSitemap()
public
setShowInSitemap(bool $showInSitemap) : $this
Parameters
- $showInSitemap : bool
Return values
$thissetShowTitle()
public
setShowTitle(bool $showTitle) : $this
Parameters
- $showTitle : bool
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$thissetUpdateDatetime()
public
setUpdateDatetime(DateTime|null $dt) : $this
Parameters
- $dt : DateTime|null
Return values
$thistranslationCollectionInit()
public
translationCollectionInit() : void
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>