MenuHelper
class MenuHelper
Menu Helper utility
Methods
static
void
addPreset(
string $name,
string $title,
string $path,
bool $replace = true)
Add a custom preset externally via plugin or any other means.
static
stdClass[]
getPresets()
Get a list of available presets.
static
stdClass[]
loadPreset(
string $name,
bool $fallback = true)
Load the menu items from a preset file into a hierarchical list of objects
static
void
static
stdClass[]
createLevels(
stdClass[] $menuItems)
Parse the flat list of menu items and prepare the hierarchy of them using parent-child relationship.
Details
static
void
addPreset(
string $name,
string $title,
string $path,
bool $replace = true)
Add a custom preset externally via plugin or any other means.
WARNING: Presets with same name will replace previously added preset except Joomla's default preset (joomla)
static
stdClass[]
loadPreset(
string $name,
bool $fallback = true)
Load the menu items from a preset file into a hierarchical list of objects