class Cache extends AbstractCacheStorage

Class Cache

Constants

CACHE_ID

CACHE_ID_VISIBLE

Properties

protected Cache $cache from AbstractCacheStorage
protected Translator $translator
protected MenuRepository $menuRepository
protected MenuItemRepository $menuItemRepository

Methods

__construct(Cache $cache, Translator $translator, MenuRepository $menuRepository, MenuItemRepository $menuItemRepository)

No description

CacheProvider
getCacheDriver()

No description

array
getMenusCache()

Returns the cached menu items

boolean
saveMenusCache()

Saves the menu items to the cache

boolean
saveVisibleMenuItemsCache(string $menuIdentifier)

Saves the visible menu items to the cache

array
getVisibleMenuItems(string $menuIdentifier)

Returns the cached visible menu items

bool
isFirstItemInSet(int $index, array $menuItems)

No description

bool
isLastItemInSet(int $index, array $menuItems)

No description

Details

at line 36
__construct(Cache $cache, Translator $translator, MenuRepository $menuRepository, MenuItemRepository $menuItemRepository)

Parameters

Cache $cache
Translator $translator
MenuRepository $menuRepository
MenuItemRepository $menuItemRepository

in AbstractCacheStorage at line 28
CacheProvider getCacheDriver()

Return Value

CacheProvider

at line 54
array getMenusCache()

Returns the cached menu items

Return Value

array

at line 68
boolean saveMenusCache()

Saves the menu items to the cache

Return Value

boolean

at line 114
boolean saveVisibleMenuItemsCache(string $menuIdentifier)

Saves the visible menu items to the cache

Parameters

string $menuIdentifier

Return Value

boolean

at line 129
array getVisibleMenuItems(string $menuIdentifier)

Returns the cached visible menu items

Parameters

string $menuIdentifier

Return Value

array

at line 144
protected bool isFirstItemInSet(int $index, array $menuItems)

Parameters

int $index
array $menuItems

Return Value

bool

at line 165
protected bool isLastItemInSet(int $index, array $menuItems)

Parameters

int $index
array $menuItems

Return Value

bool