AdminMenuItem
extends AdminMenuItem
in package
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_admin_system_menu_items'
- #[TableAlias]
- 'adminMenuItem'
Table of Contents
Properties
- $active : bool
- $class : string|null
- $comment : string|null
- $dashboardOrder : int
- Tile order within its section. `0` means "order by menu", not "first": otherwise every newly enabled tile would jump to the top and the admin would have to renumber all others.
- $dashboardTile : bool
- $hasSubmenu : bool|null
- $id : int|null
- $imgClass : string|null
- $level : int
- $lft : int
- $menuId : int
- $page : TPage|null
- $pageId : int|null
- $params : string|null
- $parentId : int|null
- $rgt : int
- $separator : bool
- $translations : Collection
- $ulClass : string|null
- $ulId : string|null
Methods
- __construct() : mixed
- addTranslation() : $this
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getActive() : bool
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getClass() : string|null
- getComment() : string|null
- getDashboardOrder() : int
- getDashboardTile() : bool
- getHasSubmenu() : bool|null
- getId() : int|null
- getImgClass() : string|null
- getLevel() : int
- getLft() : int
- getMenuId() : int
- getPage() : TPage|null
- getPageId() : int|null
- getParams() : string|null
- getParamsArray() : array<string, scalar>
- Returns the link parameters as an array. Invalid or non-object JSON means no parameters; a broken menu item must not break the whole menu.
- getParentId() : int|null
- getRgt() : int
- getSeparator() : bool
- getTranslation() : TTranslation|null
- getTranslations() : Collection<int, TTranslation>
- getUlClass() : string|null
- getUlId() : string|null
- hasSubmenu() : bool|null
- isActive() : bool
- isDashboardTile() : bool
- isPersisted() : bool
- isSeparator() : bool
- removeTranslation() : $this
- setActive() : $this
- setClass() : $this
- setComment() : $this
- setDashboardOrder() : $this
- setDashboardTile() : $this
- setHasSubmenu() : $this
- setId() : $this
- setImgClass() : $this
- setLevel() : $this
- setLft() : $this
- setMenuId() : $this
- setPage() : $this
- setPageId() : $this
- setParams() : TTranslation>
- setParentId() : $this
- setRgt() : $this
- setSeparator() : $this
- setTranslations() : $this
- setUlClass() : $this
- setUlId() : $this
- translationCollectionInit() : void
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$active
protected
bool
$active
= true
Attributes
- #[Column]
- $name: 'active'
- $type: 'boolean'
$class
protected
string|null
$class
= null
Attributes
- #[Column]
- $name: 'class'
- $type: 'string'
- $length: 255
- $nullable: true
$comment
protected
string|null
$comment
= null
Attributes
- #[Column]
- $name: 'comment'
- $type: 'string'
- $length: 255
- $nullable: true
$dashboardOrder
Tile order within its section. `0` means "order by menu", not "first": otherwise every newly enabled tile would jump to the top and the admin would have to renumber all others.
protected
int
$dashboardOrder
= 0
Attributes
- #[Column]
- $name: 'dashboard_order'
- $type: 'integer'
- $options: ['default' => 0]
$dashboardTile
protected
bool
$dashboardTile
= false
Attributes
- #[Column]
- $name: 'dashboard_tile'
- $type: 'boolean'
- $options: ['default' => 0]
$hasSubmenu
protected
bool|null
$hasSubmenu
= false
Attributes
- #[Column]
- $name: 'has_submenu'
- $type: 'boolean'
- $nullable: true
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'menu_item_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$imgClass
protected
string|null
$imgClass
= null
Attributes
- #[Column]
- $name: 'imgClass'
- $type: 'string'
- $length: 255
- $nullable: true
$level
protected
int
$level
= 0
Attributes
- #[Column]
- $name: 'level'
- $type: 'integer'
$lft
protected
int
$lft
= 0
Attributes
- #[Column]
- $name: 'lft'
- $type: 'integer'
$menuId
protected
int
$menuId
= 1
Attributes
- #[Column]
- $name: 'menu_id'
- $type: 'integer'
$page
protected
TPage|null
$page
= null
the Doctrine association (many-to-one to AdminPage) is defined by the concrete entity per module
Attributes
- #[EntityOf]
- \App\UI\Admin\System\Models\Entities\AdminPage::class
- #[JoinColumn]
- $name: 'cms_admin_system_pages_page_id'
- $referencedColumnName: 'page_id'
- $nullable: true
- #[ManyToOne]
- $targetEntity: \App\UI\Admin\System\Models\Entities\AdminPage::class
- $fetch: "LAZY"
$pageId
protected
int|null
$pageId
= null
Attributes
- #[Column]
- $name: 'cms_admin_system_pages_page_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$params
protected
string|null
$params
= null
Attributes
- #[Column]
- $name: 'params'
- $type: 'text'
- $nullable: true
$parentId
protected
int|null
$parentId
= null
Attributes
- #[Column]
- $name: 'parent_id'
- $type: 'integer'
- $nullable: true
$rgt
protected
int
$rgt
= 0
Attributes
- #[Column]
- $name: 'rgt'
- $type: 'integer'
$separator
protected
bool
$separator
= false
Attributes
- #[Column]
- $name: 'separator'
- $type: 'boolean'
$translations
protected
Collection
$translations
Attributes
- #[CollectionOf]
- \App\UI\Admin\System\Models\Entities\AdminMenuItemText::class
- $owned: true
- #[OneToMany]
- $targetEntity: \App\UI\Admin\System\Models\Entities\AdminMenuItemText::class
- $mappedBy: 'parent'
- $cascade: ["persist", "remove"]
- $orphanRemoval: true
- $fetch: "LAZY"
$ulClass
protected
string|null
$ulClass
= null
Attributes
- #[Column]
- $name: 'ul_class'
- $type: 'string'
- $length: 255
- $nullable: true
$ulId
protected
string|null
$ulId
= null
Attributes
- #[Column]
- $name: 'ul_id'
- $type: 'string'
- $length: 255
- $nullable: true
Methods
__construct()
public
__construct([int|null $id = null ][, int $menuId = 1 ][, int|null $pageId = null ][, mixed $page = null ][, string|null $params = null ][, int $lft = 0 ][, int $rgt = 0 ][, int|null $parentId = null ][, int $level = 0 ][, string|null $class = null ][, string|null $ulClass = null ][, string|null $ulId = null ][, bool $separator = false ][, string|null $comment = null ][, bool|null $hasSubmenu = false ][, string|null $imgClass = null ][, bool $active = true ][, bool $dashboardTile = false ][, int $dashboardOrder = 0 ][, Collection $translations = new ArrayCollection() ]) : mixed
Parameters
- $id : int|null = null
- $menuId : int = 1
- $pageId : int|null = null
- $page : mixed = null
- $params : string|null = null
- $lft : int = 0
- $rgt : int = 0
- $parentId : int|null = null
- $level : int = 0
- $class : string|null = null
- $ulClass : string|null = null
- $ulId : string|null = null
- $separator : bool = false
- $comment : string|null = null
- $hasSubmenu : bool|null = false
- $imgClass : string|null = null
- $active : bool = true
- $dashboardTile : bool = false
- $dashboardOrder : int = 0
- $translations : Collection = new ArrayCollection()
addTranslation()
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
getActive()
public
getActive() : bool
Return values
boolgetAllTraits()
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>getClass()
public
getClass() : string|null
Return values
string|nullgetComment()
public
getComment() : string|null
Return values
string|nullgetDashboardOrder()
public
getDashboardOrder() : int
Return values
intgetDashboardTile()
public
getDashboardTile() : bool
Return values
boolgetHasSubmenu()
public
getHasSubmenu() : bool|null
Return values
bool|nullgetId()
public
getId() : int|null
Return values
int|nullgetImgClass()
public
getImgClass() : string|null
Return values
string|nullgetLevel()
public
getLevel() : int
Return values
intgetLft()
public
getLft() : int
Return values
intgetMenuId()
public
getMenuId() : int
Return values
intgetPage()
public
getPage() : TPage|null
Return values
TPage|nullgetPageId()
public
getPageId() : int|null
Return values
int|nullgetParams()
public
getParams() : string|null
Return values
string|nullgetParamsArray()
Returns the link parameters as an array. Invalid or non-object JSON means no parameters; a broken menu item must not break the whole menu.
public
getParamsArray() : array<string, scalar>
Return values
array<string, scalar>getParentId()
public
getParentId() : int|null
Return values
int|nullgetRgt()
public
getRgt() : int
Return values
intgetSeparator()
public
getSeparator() : 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>getUlClass()
public
getUlClass() : string|null
Return values
string|nullgetUlId()
public
getUlId() : string|null
Return values
string|nullhasSubmenu()
public
hasSubmenu() : bool|null
Return values
bool|nullisActive()
public
isActive() : bool
Return values
boolisDashboardTile()
public
isDashboardTile() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolisSeparator()
public
isSeparator() : bool
Return values
boolremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetActive()
public
setActive(bool $active) : $this
Parameters
- $active : bool
Return values
$thissetClass()
public
setClass(string|null $class) : $this
Parameters
- $class : string|null
Return values
$thissetComment()
public
setComment(string|null $comment) : $this
Parameters
- $comment : string|null
Return values
$thissetDashboardOrder()
public
setDashboardOrder(int $dashboardOrder) : $this
Parameters
- $dashboardOrder : int
Return values
$thissetDashboardTile()
public
setDashboardTile(bool $dashboardTile) : $this
Parameters
- $dashboardTile : bool
Return values
$thissetHasSubmenu()
public
setHasSubmenu(bool|null $hasSubmenu) : $this
Parameters
- $hasSubmenu : bool|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetImgClass()
public
setImgClass(string|null $imgClass) : $this
Parameters
- $imgClass : string|null
Return values
$thissetLevel()
public
setLevel(int $level) : $this
Parameters
- $level : int
Return values
$thissetLft()
public
setLft(int $lft) : $this
Parameters
- $lft : int
Return values
$thissetMenuId()
public
setMenuId(int $menuId) : $this
Parameters
- $menuId : int
Return values
$thissetPage()
public
setPage(TPage|null $page) : $this
Parameters
- $page : TPage|null
Return values
$thissetPageId()
public
setPageId(int|null $pageId) : $this
Parameters
- $pageId : int|null
Return values
$thissetParams()
public
setParams(string|null $params) : TTranslation>
Parameters
- $params : string|null
Return values
TTranslation>setParentId()
public
setParentId(int|null $parentId) : $this
Parameters
- $parentId : int|null
Return values
$thissetRgt()
public
setRgt(int $rgt) : $this
Parameters
- $rgt : int
Return values
$thissetSeparator()
public
setSeparator(bool $separator) : $this
Parameters
- $separator : bool
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$thissetUlClass()
public
setUlClass(string|null $ulClass) : $this
Parameters
- $ulClass : string|null
Return values
$thissetUlId()
public
setUlId(string|null $ulId) : $this
Parameters
- $ulId : string|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>