catalogTopmenu
Intercepts Magento\Theme\Block\Html\Topmenu
- Type:
Magento\Catalog\Plugin\Block\Topmenu - Purpose: Adds category tree to navigation menu
- Methods: beforeGetHtml(), afterGetIdentities()
Complete reference for all 47 plugin declarations and 24 observer classes in Magento_Catalog with sortOrder, security implications, and performance considerations.
Magento_Catalog defines 47 plugin declarations across 5 areas (global, adminhtml, frontend, webapi_rest, webapi_soap). Plugins intercept method calls to modify behavior without modifying core code.
23 plugins for core functionality
5 plugins for admin operations
19 plugins for API and frontend
Plugins execute by sortOrder (lowest first). Before plugins run in ascending order, After plugins run in descending order. Around plugins wrap the original method.
Intercepts Magento\Theme\Block\Html\Topmenu
Magento\Catalog\Plugin\Block\TopmenuIntercepts Magento\Customer\Model\ResourceModel\Visitor
Magento\Catalog\Model\Plugin\LogIntercepts Magento\Catalog\Model\Category\DataProvider
Magento\Catalog\Model\Plugin\SetPageLayoutDefaultValueIntercepts Magento\Config\Model\Config
Magento\Catalog\Model\Plugin\ShowOutOfStockConfigIntercepts EAV attribute backend validation
Magento\Catalog\Plugin\Model\Attribute\Backend\AttributeValidationIntercepts quote to order conversion
Magento\Catalog\Model\Plugin\QuoteItemProductOptionA significant portion of Catalog plugins handle indexer invalidation when related entities change.
| Plugin Name | Target | Indexer Affected |
|---|---|---|
invalidatePriceIndexerOnWebsite |
Store\Model\ResourceModel\Website | catalog_product_price |
categoryProductWebsiteAfterDelete |
Store\Model\ResourceModel\Website | catalog_category_product |
storeViewResourceAroundSave |
Store\Model\ResourceModel\Store | catalog_category_flat |
catalogProductFlatIndexerStore |
Store\Model\ResourceModel\Store | catalog_product_flat |
categoryStoreAroundSave |
Store\Model\ResourceModel\Store | catalog_category_product |
productAttributesStoreViewSave |
Store\Model\ResourceModel\Store | catalog_product_attribute |
invalidatePriceIndexerOnCustomerGroup |
Customer\Model\ResourceModel\Group | catalog_product_price |
invalidateEavIndexerOnAttributeSetSave |
Eav\Model\Entity\Attribute\Set | catalog_product_attribute |
Magento_Catalog includes 24 observer classes that respond to system events. Located in Observer/ directory.
Event: catalog_product_save_commit_after
Queues image resize operations after product save to avoid blocking the save operation.
Event: catalog_product_save_before
Sets special price start date to today if special price is set but start date is empty.
Event: catalog_category_prepare_save
Checks admin user permissions before allowing design attribute changes on categories.
Event: catalog_category_save_after
Invalidates full page cache when category design settings change.
Event: admin_system_config_changed_section_catalog
Updates price attribute scope when catalog price scope config changes.
Event: store_save_after
Synchronizes website-scoped EAV attributes when store view changes.
Event: catalog_category_*
Flushes FPC for category pages when category data changes.
Event: catalog_category_save_after
Triggers category-product indexer reindex after category save.
Key events dispatched by Magento_Catalog defined in etc/events.xml.
magento_catalog_api_data_productinterface_save_beforemagento_catalog_api_data_productinterface_save_aftermagento_catalog_api_data_productinterface_delete_beforemagento_catalog_api_data_productinterface_delete_aftermagento_catalog_api_data_productinterface_load_aftercatalog_product_save_beforecatalog_product_save_commit_aftermagento_catalog_api_data_categoryinterface_save_beforemagento_catalog_api_data_categoryinterface_save_aftermagento_catalog_api_data_categoryinterface_delete_beforemagento_catalog_api_data_categoryinterface_delete_aftermagento_catalog_api_data_categoryinterface_load_aftercatalog_category_prepare_saveadmin_system_config_changed_section_catalogstore_save_afterPlugins have full access to method arguments and return values. Malicious plugins can intercept sensitive data. Always audit third-party modules for suspicious plugins on security-critical classes like CustomerRepository, OrderRepository, or PaymentInterface.