CategoryEventContainer
class CategoryEventContainer
Class CategoryEventContainer is injected as service. CategoryEventContainer is listener class for handling a logic for dispatched events
Constants
| CATEGORY_SIDE_BAR_CASH |
Category sidebar cache key |
| CATEGORY_MEGA_MENU |
Category megamenu cache key |
| CATEGORY_MENU_SEARCH |
Category menu search cache key |
Properties
| ContainerInterface | $container |
Methods
No description
Get export settings
Get import options
Check if logged user has role admin
Get translator service
Get default locale from current request
Get products bt category wth pagination options page, offset and count for category with provided id
Perform products search using ProductSearchWrapper
Perform count search on products using ProductSearchWrapper
Get category filter prices for requested category
Set category tree structure to cache
Set categories to cache
Set footer html to cache
Get category tree from cache
Set megamenu category tree to cache
Get megamenu category tree from cache
Get all categories for frontend from cache
Dispatch signal for generating category tree
Dispatch category changed signal
Dispatch import categories from csv event
Generate route for given route name and data
Get category filter for category by slug
Dispatch event to update cached products
Dispatch product groups update event
Dispatch tree decorator event for given locale
Dispatch category tree contidions event
Delete images from category gallery
Get category slug
Get available languages
Dispatch generate translations signal with response array as argument
Dispatch delete brand translations with keys argument
Dispatch remove images for deleted categories with images id as arguments
Dispatch signal for category product count update
Adds new request to request stack
Get search settings from cache
Translate category by key and locale
Get current logged user from token storage
Dispatch regex create event
Check if permalink is available
Details
at line 58
__construct(ContainerInterface $container)
at line 67
array
getExportSettings()
Get export settings
at line 78
mixed
getImportCSVParentCategoriesOption()
Get import options
at line 87
mixed
hasRoleAdmin()
Check if logged user has role admin
at line 96
Translator
getTranslator()
Get translator service
at line 105
string
getDefaultLocale()
Get default locale from current request
at line 121
array
getProductsByCategoryWithPaginationSimple($id, $page, $offset, $count, $searchParams = null)
Get products bt category wth pagination options page, offset and count for category with provided id
at line 134
array
doProductSearch(ProductSearchWrapper $searchWrapper)
Perform products search using ProductSearchWrapper
at line 147
array
doProductSearchCount(ProductSearchWrapper $searchWrapper)
Perform count search on products using ProductSearchWrapper
at line 158
mixed
getCategoryFilterPricesByCategory(int $id)
Get category filter prices for requested category
at line 170
mixed
setCashCategoryTree(mixed $data, string $locale = null)
Set category tree structure to cache
at line 183
mixed
setAllCategoriesToCache(mixed $data)
Set categories to cache
at line 193
setFooterLayoutToCash()
Set footer html to cache
at line 203
mixed
getCashCategoryTree()
Get category tree from cache
at line 217
mixed
setMegaMenuCategoryTree(mixed $data, string|null $locale = null)
Set megamenu category tree to cache
at line 228
mixed
getCacheMegaMenuCategoryTree()
Get megamenu category tree from cache
at line 238
mixed
getAllCatsForFrontend()
Get all categories for frontend from cache
at line 248
CategoryTreeSignalEvent
dispatchTeeGenerateSignal()
Dispatch signal for generating category tree
at line 262
dispatchCategoryChangeSignal(array $categories, null $mainCategory = null, null $oldCategory = null)
Dispatch category changed signal
at line 281
Event
dispatchImportCategoriesFromCSVCustom(EventWithResult $event)
Dispatch import categories from csv event
at line 293
string
generateRoute(string $routeName, array $data)
Generate route for given route name and data
at line 304
mixed
getFilterForCat(string $slug)
Get category filter for category by slug
at line 313
Event
dispatchPromoProductsReCache()
Dispatch event to update cached products
at line 324
CategoryEvent
dispatchCategoryDisplayChange(Category $category)
Dispatch category display change signal
at line 340
EventWithResult|Event
dispatchProductGroupsUpdateEvent(ProductGroupEvent $productGroupEvent)
Dispatch product groups update event
at line 352
CategoryEvent
dispatchCategoryTreeDecoratorEvent(string $locale)
Dispatch tree decorator event for given locale
at line 364
EventWithResult|Event
dispatchCategoryTreeConditionsEvent()
Dispatch category tree contidions event
at line 375
mixed
dispatchCategoryEvent(ProductSearchWrapper $searchWrapper)
Dispatch category event
at line 387
deleteImagesFromCatGallery(mixed $images)
Delete images from category gallery
at line 399
removeImageFromDb(Image $image)
Remove image from database
at line 411
mixed
getCategorySlug()
Get category slug
at line 425
array
getAvailableLanguages()
Get available languages
at line 434
dispatchGenerateTranslationSignal(mixed $responseArray)
Dispatch generate translations signal with response array as argument
at line 446
dispatchDeleteBrandTranslations(mixed $keys)
Dispatch delete brand translations with keys argument
at line 455
dispatchRemoveImagesForDeletedCategories(array $imagesIds)
Dispatch remove images for deleted categories with images id as arguments
at line 464
CategoryEvent
signalCategoryProductCountUpdate()
Dispatch signal for category product count update
at line 475
setNewRequest(Request $request)
Adds new request to request stack
at line 486
bool|mixed|SearchSettings|string
getSearchSettings()
Get search settings from cache
at line 498
string
transCategory(string $key, string $locale)
Translate category by key and locale
at line 507
mixed
getCurrentUser()
Get current logged user from token storage
at line 518
EventWithResult
dispatchRegexCreateEvent(string $regex)
Dispatch regex create event
at line 529
boolean
checkIfPermalinkIsAvailable(string $permalink)
Check if permalink is available