Custom Events
We provide custom events for developers to hook their custom code into.
You can learn how to create listeners on custom events in a custom extension in Create a custom extension tutorial.
Products
Dispatching before pushing products’ index settings to Algolia
algolia_products_index_before_set_settings
Passed parameters:
$storeId
$index_settings
as data inMagento\Framework\DataObject
object
Modifiable parameters:
$index_settings
as data inMagento\Framework\DataObject
object
Dispatching after products collection creation
algolia_after_products_collection_build
Passed parameters:
$storeId
$collection
asMagento\Catalog\Model\ResourceModel\Product\Collection
$only_visible
$include_not_visible_individually
Modifiable parameters:
$collection
asMagento\Catalog\Model\ResourceModel\Product\Collection
Dispatching before final products collection load
algolia_before_products_collection_load
Passed parameters:
$collection
asMagento\Catalog\Model\ResourceModel\Product\Collection
$store
Modifiable parameters:
$collection
Dispatching before fetching product’s attributes for indexing
algolia_product_index_before
Passed parameters:
$product
asMagento\Catalog\Model\Product
$custom_data
as data inMagento\Framework\DataObject
object
Modifiable parameters:
$custom_data
as data inMagento\Framework\DataObject
object
Dispatching after fetching product’s attributes for indexing
algolia_after_create_product_object
Passed parameters:
$custom_data
as data inMagento\Framework\DataObject
object$subProducts
as array of sub products$productObject
asMagento\Catalog\Model\Product
Modifiable parameters:
$custom_data
as data inMagento\Framework\DataObject
object
Categories
Dispatching before pushing categories’ index settings to Algolia
algolia_categories_index_before_set_settings
Passed parameters:
$storeId
$index_settings
as data inMagento\Framework\DataObject
object
Modifiable parameters:
$index_settings
as data inMagento\Framework\DataObject
object
Dispatching after categories collection creation
algolia_after_categories_collection_build
Passed parameters:
$store
$collection
asMagento\Catalog\Model\ResourceModel\Category\Collection
Modifiable parameters:
$collection
Dispatching before fetching category’s attributes for indexing
algolia_category_index_before
Passed parameters:
$category
asMagento\Catalog\Model\Category
$custom_data
as data inMagento\Framework\DataObject
object
Modifiable parameters:
$custom_data
as data inMagento\Framework\DataObject
object
Dispatching after fetching category’s attributes for indexing
algolia_after_create_category_object
Passed parameters:
$category
as data inMagento\Framework\DataObject
object$categoryObject
asMagento\Catalog\Model\Category
Modifiable parameters:
$category
as data inMagento\Framework\DataObject
object
Pages
Dispatching before pushing pages’ index settings to Algolia
algolia_pages_index_before_set_settings
Passed parameters:
$store_id
$index_settings
as data inMagento\Framework\DataObject
object
Modifiable parameters:
$index_settings
as data inMagento\Framework\DataObject
object
Dispatching after fetching page’s attributes for indexing
algolia_after_create_page_object
Passed parameters:
$page
as data inMagento\Framework\DataObject
object$pageObject
asMagento\Cms\Model\Page
Modifiable parameters:
$page
as data inMagento\Framework\DataObject
object
Suggestions
Dispatching before pushing suggestions’ index settings to Algolia
algolia_suggestions_index_before_set_settings
Passed parameters:
$store_id
$index_settings
as data inMagento\Framework\DataObject
object
Modifiable parameters:
$index_settings
as data inMagento\Framework\DataObject
object
Dispatching after suggestions collection creation
algolia_after_suggestions_collection_build
Passed parameters:
$store
$collection
asMagento\Search\Model\ResourceModel\Query\Collection
Modifiable parameters:
$collection
Dispatching after fetching suggestion’s attributes for indexing
algolia_after_create_suggestion_object
Passed parameters:
$suggestion
as data inMagento\Framework\DataObject
object$suggestionObject
asMagento\Search\Model\Query
Modifiable parameters:
$suggestion
as data inMagento\Framework\DataObject
object
Additional sections
Dispatching before pushing additional sections’ index settings to Algolia
algolia_additional_sections_index_before_set_settings
Passed parameters:
$store_id
$index_settings
as data inMagento\Framework\DataObject
object
Modifiable parameters:
$index_settings
as data inMagento\Framework\DataObject
object
Dispatching after fetching additional_section’s attributes for indexing
algolia_additional_section_items_before_index
Passed parameters:
$section
$record
as data inMagento\Framework\DataObject
object$store_id
Modifiable parameters:
$record
as data inMagento\Framework\DataObject
object
Front-end configuration
Dispatching after front-end configuration creation
algolia_after_create_configuration
Passed parameters:
$configuration
as data inMagento\Framework\DataObject
object
Modifiable parameters:
$configuration
as data inMagento\Framework\DataObject
object