ModelAdmin module

MenuElement

A model in the Admin module, with 22 members for templates, 19 API properties and 39 members for admin templates.

Admin\Models\Frontend\MenuElement Admin\Models\Api\MenuElement Admin\Models\Backend\MenuElement Also in Admin: Job Notification
View
What Smarty and Twig templates receive. Properties in REST API responses and job payloads. What admin screen templates receive when you override them.

Templates view

Properties 22

Take no arguments.

# getId()
?int
# getPosition()
?int
# getName()
?string
# getIdentifier()
?string
# isVisible()
bool
# isPredefined()
bool
# getIcon()
?string
# getModuleRoute()
?string
# getControllerRoute()
?string
# getParameters()
?array
# getUrl()
?string
# getAuthModule()
?string
# getAuthModulePermission()
?string
# getAuthEntity()
?string
# getAuthEntityPermission()
?string
# getAuthRequiredUserType()
?string
# getParent()
?MenuElement
# getChildren()
?Collection<MenuElement>
# getFullPosition()
string
Get the full, dot-separated full position for hierarchical records
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned

API & Jobs view

API & JobsEach property is a key in REST API responses and job payloads. Its name is the template getter without get, is or has. Methods that need arguments are not available here.

Properties 19

Read-only values on the record.

# id
?int
# position
?int
# name
?string
# identifier
?string
# visible
bool
# predefined
bool
# icon
?string
# moduleRoute
?string
# controllerRoute
?string
# parameters
?array
# url
?string
# authModule
?string
# authModulePermission
?string
# authEntity
?string
# authEntityPermission
?string
# authRequiredUserType
?string
# parent
?MenuElement
# children
?Collection<MenuElement>
# fullPosition
string
Get the full, dot-separated full position for hierarchical records

Admin view

AdminAvailable in cdna-admin templates. Copy an admin template into your site repository to change how this record is edited.

Properties 39

Take no arguments.

# getId()
?int
# getPosition()
?int
# getName()
?string
# getIdentifier()
?string
# isVisible()
bool
# isPredefined()
bool
# getIcon()
?string
# getModuleRoute()
?string
# getControllerRoute()
?string
# getParameters()
?array
# getUrl()
?string
# getAuthModule()
?string
# getAuthModulePermission()
?string
# getAuthEntity()
?string
# getAuthEntityPermission()
?string
# getAuthRequiredUserType()
?string
# getParent()
?MenuElement
# getChildren()
?Collection<MenuElement>
# getFullPosition()
string
Get the full, dot-separated full position for hierarchical records
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned
# getVisibleChildren() Admin only
Collection
Returns the visible children of this menu element
# isValid() Admin only
bool
Checks if the menu element is valid
# isVisibleToUser() Admin only
bool
Checks whether the menu element is visible to the user
# isActive() Admin only
bool
Determines whether the menu element is active
# getTranslatedName() Admin only
string
Returns the translated name of the menu element, if a dot is contained in the menu element name
# hasVisibleChildren() Admin only
bool
Checks whether the menu element has any visible children
# hasActiveChildren() Admin only
bool
Checks whether the menu element has any active children
# getModulePath() Admin only
?string
Returns the module path of the menu element
# getFullPath() Admin only
?string
Returns the full path of the menu element, using either the specified URL or generating a URL based on the provided route and parameters
# isAddressable() Admin only
bool
Checks whether the menu element is addressable => can have a link
# getAvailableRequiredUserTypes() Admin only
array
Provides the available user types to be selected for restricting a menu element to a specific user type
# getParametersString() Admin only
?string
Retrieves the parameters for the route as JSON encoded string
# getCreateChildUrl() Admin only
?string
Get the url for creating a child record.
# getEditUrl() Admin only
?string
Get the url for editing the record.
# getDeleteUrl() Admin only
?string
Get the url for deleting the record.
# getMoveUrl() Admin only
?string
Get the url for moving the record.