MenuProcessor
in package
Class MenuProcessor
Table of Contents
- $factory : PostCacheMenuFactory
- $favouritesRepository : FavouritesHashListRepository
- __construct() : mixed
- MenuProcessor constructor.
- process() : array<string|int, mixed>
- Processes the menu cache data.
Properties
$factory
private
PostCacheMenuFactory
$factory
$favouritesRepository
private
FavouritesHashListRepository
$favouritesRepository
Methods
__construct()
MenuProcessor constructor.
public
__construct(FavouritesHashListRepository $favouritesRepository, PostCacheMenuFactory $factory) : mixed
Parameters
- $favouritesRepository : FavouritesHashListRepository
- $factory : PostCacheMenuFactory
Return values
mixed —process()
Processes the menu cache data.
public
process(MenuGroups $groups, array<string|int, mixed> $menuCacheData[, string|null $connectedPage = null ]) : array<string|int, mixed>
This function checks if the current user has permissions to get the menu item displayed. Additionally, it creates a url for the menu item and hashes the value, so menu items can be added to the favourites.
Parameters
- $groups : MenuGroups
- $menuCacheData : array<string|int, mixed>
- $connectedPage : string|null = null