Jinya CMS

Menu extends Entity
in package
implements JsonSerializable

This class contains a menu, menus contain menu items, which are used to create the navigation in themes

Tags

Interfaces, Classes, Traits and Enums

JsonSerializable

Table of Contents

$id  : int
$logo  : int|null
$name  : string
format()  : array<string, array<string, int|string>|int|string>
Formats the current menu into an array
getItems()  : Iterator<string|int, MenuItem>
Gets the menu items
getLogo()  : File|null
Gets the logo file
jsonSerialize()  : mixed
replaceItems()  : void
insertChildItems()  : void

Properties

public int|null $logo = null

The ID of the file containing the logo

Tags

$name

public string $name

The name of the menu might be displayed in the frontend

Tags

Methods

format()

Formats the current menu into an array

public format() : array<string, array<string, int|string>|int|string>
Tags
Return values
array<string, array<string, int|string>|int|string>

getItems()

Gets the menu items

public getItems() : Iterator<string|int, MenuItem>
Tags
Return values
Iterator<string|int, MenuItem>

Gets the logo file

public getLogo() : File|null
Tags
Return values
File|null

jsonSerialize()

public jsonSerialize() : mixed
Tags
Return values
mixed

replaceItems()

public replaceItems(array<string|int, array{artistId?: int|null, formId?: int|null, classicPageId?: int|null, modernPageId?: int|null, galleryId?: int|null, categoryId?: int|null, blogHomePage?: bool|null, title: string, route?: string|null, highlighted?: bool|null, items?: array|null}> $items) : void
Parameters
$items : array<string|int, array{artistId?: int|null, formId?: int|null, classicPageId?: int|null, modernPageId?: int|null, galleryId?: int|null, categoryId?: int|null, blogHomePage?: bool|null, title: string, route?: string|null, highlighted?: bool|null, items?: array|null}>
Tags
throws
TransactionFailedException
Return values
void

insertChildItems()

private insertChildItems(array<string|int, array{artistId?: int|null, formId?: int|null, classicPageId?: int|null, modernPageId?: int|null, galleryId?: int|null, categoryId?: int|null, blogHomePage?: bool|null, title: string, route?: string|null, highlighted?: bool|null, items?: array|null}> $items, int $parentId) : void
Parameters
$items : array<string|int, array{artistId?: int|null, formId?: int|null, classicPageId?: int|null, modernPageId?: int|null, galleryId?: int|null, categoryId?: int|null, blogHomePage?: bool|null, title: string, route?: string|null, highlighted?: bool|null, items?: array|null}>
$parentId : int
Tags
Return values
void

Search results