CoolCMS API

AdminPage extends AdminPage
in package

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_admin_system_pages'
#[TableAlias]
'adminPage'

Table of Contents

Properties

$action  : string
$component  : string|null
$frontpage  : bool
$id  : int|null
$layout  : string
$level  : int
$lft  : int
$menuItemRels  : Collection
$parentId  : int|null
$presenter  : string
$rgt  : int
$showInMenu  : bool
$translations  : Collection

Methods

__construct()  : mixed
addMenuItemRel()  : $this
addTranslation()  : $this
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
clearMenuItemRels()  : $this
getAction()  : string
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getComponent()  : string|null
getFrontpage()  : bool
getId()  : int|null
getLayout()  : string
getLevel()  : int
getLft()  : int
getMenuItemIds()  : array<int, int>
Returns ids of the menu items the page is attached to.
getMenuItemRels()  : Collection<int, TMenuItemRel>
getParentId()  : int|null
getPresenter()  : string
getRgt()  : int
getShowInMenu()  : bool
getTranslation()  : TTranslation|null
getTranslations()  : Collection<int, TTranslation>
isFrontpage()  : bool
isPersisted()  : bool
isShowInMenu()  : bool
menuItemRelCollectionInit()  : void
removeMenuItemRel()  : $this
removeTranslation()  : $this
setAction()  : $this
setComponent()  : $this
setFrontpage()  : $this
setId()  : $this
setLayout()  : $this
setLevel()  : $this
setLft()  : $this
setMenuItemRels()  : $this
setParentId()  : $this
setPresenter()  : $this
setRgt()  : $this
setShowInMenu()  : $this
setTranslations()  : $this
translationCollectionInit()  : void
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$action

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

$component

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

$frontpage

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

$id

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

$layout

protected string $layout = 'index.latte'
Attributes
#[Column]
$name: 'layout'
$type: 'string'
$length: 100

$level

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

$lft

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

$menuItemRels

protected Collection $menuItemRels
Attributes
#[OneToMany]
$targetEntity: \App\UI\Api\System\Models\Entities\AdminPageMenuItemRel::class
$mappedBy: 'adminPage'
$cascade: ["persist", "remove"]
$orphanRemoval: true
$fetch: "LAZY"

$parentId

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

$presenter

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

$rgt

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

$showInMenu

protected bool $showInMenu = true
Attributes
#[Column]
$name: 'show_in_menu'
$type: 'boolean'

$translations

protected Collection $translations
Attributes
#[OneToMany]
$targetEntity: \App\UI\Api\System\Models\Entities\AdminPageText::class
$mappedBy: 'parent'
$cascade: ["persist", "remove"]
$orphanRemoval: true
$fetch: "LAZY"

Methods

__construct()

public __construct([int|null $id = null ][, string|null $component = null ][, string $presenter = '' ][, string $action = '' ][, int $lft = 0 ][, int $rgt = 0 ][, int $level = 0 ][, int|null $parentId = null ][, string $layout = 'index.latte' ][, bool $showInMenu = true ][, bool $frontpage = false ][, Collection $translations = new ArrayCollection() ][, Collection $menuItemRels = new ArrayCollection() ]) : mixed
Parameters
$id : int|null = null
$component : string|null = null
$presenter : string = ''
$action : string = ''
$lft : int = 0
$rgt : int = 0
$level : int = 0
$parentId : int|null = null
$layout : string = 'index.latte'
$showInMenu : bool = true
$frontpage : bool = false
$translations : Collection = new ArrayCollection()
$menuItemRels : Collection = new ArrayCollection()

addMenuItemRel()

public addMenuItemRel(TMenuItemRel $menuItemRel) : $this
Parameters
$menuItemRel : TMenuItemRel
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

getAction()

public getAction() : string
Return values
string

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>

getComponent()

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

getFrontpage()

public getFrontpage() : bool
Return values
bool

getLayout()

public getLayout() : string
Return values
string

getLevel()

public getLevel() : int
Return values
int

getLft()

public getLft() : int
Return values
int

getMenuItemIds()

Returns ids of the menu items the page is attached to.

public getMenuItemIds() : array<int, int>

The relation has no scalar column and the id is read from the association, so the caller must load the page with the include menuItemRels.adminMenuItem; menuItemRels alone returns rows with a null adminMenuItem and the result is empty.

Return values
array<int, int>

getMenuItemRels()

public getMenuItemRels() : Collection<int, TMenuItemRel>
Return values
Collection<int, TMenuItemRel>

getParentId()

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

getPresenter()

public getPresenter() : string
Return values
string

getRgt()

public getRgt() : int
Return values
int

getShowInMenu()

public getShowInMenu() : 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>

isFrontpage()

public isFrontpage() : bool
Return values
bool

isShowInMenu()

public isShowInMenu() : bool
Return values
bool

removeMenuItemRel()

public removeMenuItemRel(TMenuItemRel $menuItemRel) : $this
Parameters
$menuItemRel : TMenuItemRel
Return values
$this

removeTranslation()

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

setAction()

public setAction(string $action) : $this
Parameters
$action : string
Return values
$this

setComponent()

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

setFrontpage()

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

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
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

setMenuItemRels()

public setMenuItemRels(Collection<int, TMenuItemRel>|array<int, TMenuItemRel> $menuItemRels) : $this
Parameters
$menuItemRels : Collection<int, TMenuItemRel>|array<int, TMenuItemRel>
Return values
$this

setParentId()

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

setPresenter()

public setPresenter(string $presenter) : $this
Parameters
$presenter : string
Return values
$this

setRgt()

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

setShowInMenu()

public setShowInMenu(bool $showInMenu) : $this
Parameters
$showInMenu : 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

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