AdminPage
extends AdminPage
in package
Tags
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
$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
clearMenuItemRels()
public
clearMenuItemRels() : $this
Return values
$thisgetAction()
public
getAction() : string
Return values
stringgetAllTraits()
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|nullgetFrontpage()
public
getFrontpage() : bool
Return values
boolgetId()
public
getId() : int|null
Return values
int|nullgetLayout()
public
getLayout() : string
Return values
stringgetLevel()
public
getLevel() : int
Return values
intgetLft()
public
getLft() : int
Return values
intgetMenuItemIds()
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|nullgetPresenter()
public
getPresenter() : string
Return values
stringgetRgt()
public
getRgt() : int
Return values
intgetShowInMenu()
public
getShowInMenu() : 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>isFrontpage()
public
isFrontpage() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolisShowInMenu()
public
isShowInMenu() : bool
Return values
boolmenuItemRelCollectionInit()
public
menuItemRelCollectionInit() : void
removeMenuItemRel()
public
removeMenuItemRel(TMenuItemRel $menuItemRel) : $this
Parameters
- $menuItemRel : TMenuItemRel
Return values
$thisremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetAction()
public
setAction(string $action) : $this
Parameters
- $action : string
Return values
$thissetComponent()
public
setComponent(string|null $component) : $this
Parameters
- $component : string|null
Return values
$thissetFrontpage()
public
setFrontpage(bool $frontpage) : $this
Parameters
- $frontpage : bool
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
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
$thissetMenuItemRels()
public
setMenuItemRels(Collection<int, TMenuItemRel>|array<int, TMenuItemRel> $menuItemRels) : $this
Parameters
- $menuItemRels : Collection<int, TMenuItemRel>|array<int, TMenuItemRel>
Return values
$thissetParentId()
public
setParentId(int|null $parentId) : $this
Parameters
- $parentId : int|null
Return values
$thissetPresenter()
public
setPresenter(string $presenter) : $this
Parameters
- $presenter : string
Return values
$thissetRgt()
public
setRgt(int $rgt) : $this
Parameters
- $rgt : int
Return values
$thissetShowInMenu()
public
setShowInMenu(bool $showInMenu) : $this
Parameters
- $showInMenu : bool
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
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>