Adventure Documentation

Menu extends PlatformUtility
in package

Provides access to internal Menu functions.

Tags

Table of Contents

__construct()  : mixed
getActivePages()  : array<string|int, mixed>
Get the active pages in from the menu.
getPages()  : array<string|int, mixed>
Get all pages for a menu.
getShopCategories()  : array<string|int, mixed>
Get the shop categories recursively
getShopCategoriesDesktop()  : array<string|int, mixed>
Get category navigation for the desktop menu
getStaticPages()  : array<string|int, mixed>
Get the static pages menu in logged in and logged out context.

Methods

__construct()

public __construct(Platform $platform, SmartyInstance $smarty[, ProductCategoryController|null $productCategoryController = null ]) : mixed
Parameters
$platform : Platform
$smarty : SmartyInstance
$productCategoryController : ProductCategoryController|null = null
Tags
Return values
mixed

getActivePages()

Get the active pages in from the menu.

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

[[ self::PAGE_ID => int self::PAGE_LABEL => string self::PAGE_ACTIVE => bool self::PAGE_TARGET => string self::PAGE_HREF => string self::PAGE_CHILDREN => array ]]

getPages()

Get all pages for a menu.

public getPages([array<string|int, mixed> $args = [] ]) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed> = []

[ menu => int categoryId => int parentId => int maxDepth => int static => bool ]

Tags
Return values
array<string|int, mixed>

[[ self::PAGE_ID => int self::PAGE_LABEL => string self::PAGE_ACTIVE => bool self::PAGE_TARGET => string self::PAGE_HREF => string self::PAGE_CHILDREN => ?array ] | [ self::PAGE_CATEGORY_ID => string self::PAGE_CATEGORY_LABEL => string self::PAGE_CATEGORY_PAGEID => bool self::PAGE_CATEGORY_TARGET => string self::PAGE_CATEGORY_HREF => string self::PAGE_CATEGORY_PAGEID => int self::PAGE_CHILDREN => ?array ]]

getShopCategories()

Get the shop categories recursively

public getShopCategories([int $parentId = 0 ][, int $level = 1 ][, array<string|int, mixed> $pageSizes = [] ][, int $isOnlyLevel2PageSize = 15 ]) : array<string|int, mixed>
Parameters
$parentId : int = 0

Parent category ID

$level : int = 1

Current depth level

$pageSizes : array<string|int, mixed> = []

Page sizes per level

$isOnlyLevel2PageSize : int = 15

Page size for level 2 when no children exist

Tags
Return values
array<string|int, mixed>

[[ 'id' => int, 'title' => string, 'active' => bool, 'handle' => string, 'isOnlyLevel2' => bool, 'children' => array, 'type' => string ]]

getShopCategoriesDesktop()

Get category navigation for the desktop menu

public getShopCategoriesDesktop([int $pageSize = 7 ]) : array<string|int, mixed>
Parameters
$pageSize : int = 7

Page size for level 1 categories

Tags
Return values
array<string|int, mixed>

[[ 'id' => int, 'title' => string, 'active' => bool, 'handle' => string, 'hasChildren' => bool, 'type' => string ]]

getStaticPages()

Get the static pages menu in logged in and logged out context.

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

[ myaccount => [ self::PAGE_ID => int self::PAGE_LABEL => string self::PAGE_ACTIVE => bool self::PAGE_HREF => string self::PAGE_CHILDREN => array ] ]


        

Search results