From 8228d8a698e107c9b635dfa493d51af196278cce Mon Sep 17 00:00:00 2001 From: MadMax Date: Mon, 13 Apr 2026 14:15:23 +0300 Subject: [PATCH] Synchronize hook reference pages with current PrestaShop 9.1 metadata and call examples --- .../actionAfter.md | 2 +- .../actionBefore.md | 2 +- .../actionFormModifier.md | 2 +- ...actionListingFieldsModifier.md | 2 +- ...ctionListingResultsModifier.md | 2 +- .../actionOptionsModifier.md | 2 +- .../actionGridDataModifier.md | 2 +- ...ionGridDefinitionModifier.md | 2 +- ...ionGridFilterFormModifier.md | 2 +- ...tionGridPresenterModifier.md | 2 +- ...nGridQueryBuilderModifier.md | 2 +- .../actionFormBuilderModifier.md | 2 +- .../actionFormDataProviderData.md | 2 +- ...onFormDataProviderDefaultData.md | 2 +- ...acyControllerName>ListingFieldsModifier.md | 2 +- ...cyControllerName>ListingResultsModifier.md | 2 +- .../list-of-hooks/actionAdminAfter.md | 2 +- .../actionAdminBefore.md | 2 +- ...rametersMetaControllerPostProcessBefore.md | 4 +- ...inWebserviceControllerPostProcessBefore.md | 4 +- ...onControllerPostProcessBefore.md | 2 +- ...ministrationControllerPostProcessBefore.md | 4 +- ...ceControllerPostProcessBefore.md | 4 +- ...sPerformanceControllerPostProcessBefore.md | 4 +- .../actionAdminBreadcrumbModifier.md | 2 +- .../actionAdminControllerInitAfter.md | 4 +- .../actionAdminControllerInitBefore.md | 4 +- .../actionAdminControllerSetMedia.md | 16 +++-- .../actionAdminDuplicateAfter.md | 10 ++-- .../actionAdminDuplicateBefore.md | 10 ++-- ...onControllerPostProcessBefore.md | 4 +- ...lGeolocationControllerPostProcessBefore.md | 4 +- ...onControllerPostProcessBefore.md | 4 +- ...LocalizationControllerPostProcessBefore.md | 4 +- .../actionAdminLoginControllerSetMedia.md | 10 ++-- ...ionAdminLogsControllerPostProcessBefore.md | 4 +- ...nMaintenanceControllerPostProcessBefore.md | 4 +- .../actionAdminMenuTabsModifier.md | 2 +- .../actionAdminMetaAfterWriteRobotsFile.md | 6 +- .../actionAdminMetaBeforeWriteRobotsFile.md | 6 +- .../list-of-hooks/actionAdminMetaSave.md | 7 +-- .../actionAdminOrdersTrackingNumberUpdate.md | 6 +- ...nPreferencesControllerPostProcessBefore.md | 4 +- ...ctionAdminProductsListingFieldsModifier.md | 2 +- ...tionAdminProductsListingResultsModifier.md | 2 +- ...dminSecurityControllerPostProcessBefore.md | 4 +- ...gPreferencesControllerPostProcessBefore.md | 7 ++- ...ntrollerPostProcessCarrierOptionsBefore.md | 6 +- ...ncesControllerPostProcessHandlingBefore.md | 4 +- ...taControllerPostProcessBefore.md | 4 +- ...esControllerPostProcessBefore.md | 4 +- ...rPreferencesControllerPostProcessBefore.md | 4 +- ...esControllerPostProcessBefore.md | 4 +- ...tPreferencesControllerPostProcessBefore.md | 4 +- ...dminThemesControllerUpdate_optionsAfter.md | 2 +- ...AdminThemesControllerUpdateoptionsAfter.md | 2 +- .../actionAfterCreateFormHandler.md | 2 +- .../list-of-hooks/actionAfterLoadRoutes.md | 6 +- .../actionAfterUpdateFormHandler.md | 2 +- ...actionAjaxDieBefore.md | 2 +- .../actionAttributeCombinationDelete.md | 6 +- .../actionAttributeCombinationSave.md | 11 ++-- .../list-of-hooks/actionAttributeDelete.md | 7 +-- .../actionAttributeGroupDelete.md | 7 +-- .../list-of-hooks/actionAttributeGroupSave.md | 7 +-- .../list-of-hooks/actionAttributeSave.md | 7 +-- .../list-of-hooks/actionAuthentication.md | 7 +-- .../actionAuthenticationBefore.md | 11 ++-- ...actionBeforeAjaxDie.md | 2 +- ...actionBeforeCreateFormHandler.md | 2 +- ...actionBeforeUpdateFormHandler.md | 2 +- .../actionBuildFrontEndObject.md | 4 +- .../actionBuildMailLayoutVariables.md | 2 +- .../list-of-hooks/actionCarrierProcess.md | 7 +-- .../list-of-hooks/actionCarrierUpdate.md | 7 +-- .../actionCartGetPackageShippingCost.md | 2 +- .../hooks/list-of-hooks/actionCartSave.md | 9 ++- .../hooks/list-of-hooks/actionCartSummary.md | 8 +-- .../actionCartUpdateQuantityBefore.md | 11 ++-- .../hooks/list-of-hooks/actionCategoryAdd.md | 7 +-- .../list-of-hooks/actionCategoryDelete.md | 7 +-- .../list-of-hooks/actionCategoryUpdate.md | 7 +-- .../list-of-hooks/actionCheckoutRender.md | 4 +- .../hooks/list-of-hooks/actionClearCache.md | 6 +- .../list-of-hooks/actionClearCompileCache.md | 6 +- .../list-of-hooks/actionClearSf2Cache.md | 4 +- .../actionControllerInitAfter.md | 4 +- .../actionControllerInitBefore.md | 4 +- .../list-of-hooks/actionCustomerAccountAdd.md | 7 +-- .../actionCustomerAccountUpdate.md | 4 +- .../list-of-hooks/actionCustomerAddGroups.md | 6 +- .../actionCustomerBeforeUpdateGroup.md | 6 +- .../actionCustomerLogoutAfter.md | 4 +- .../actionCustomerLogoutBefore.md | 4 +- .../list-of-hooks/actionDeleteGDPRCustomer.md | 4 +- .../actionDeliveryPriceByPrice.md | 6 +- .../actionDeliveryPriceByWeight.md | 6 +- .../hooks/list-of-hooks/actionDispatcher.md | 6 +- .../list-of-hooks/actionDispatcherAfter.md | 10 +--- .../list-of-hooks/actionDispatcherBefore.md | 8 +-- .../list-of-hooks/actionDownloadAttachment.md | 6 +- .../actionEmailAddAfterContent.md | 4 +- .../actionEmailAddBeforeContent.md | 4 +- .../list-of-hooks/actionEmailSendBefore.md | 4 +- .../list-of-hooks/actionExportGDPRData.md | 6 +- .../list-of-hooks/actionFeatureDelete.md | 9 ++- .../hooks/list-of-hooks/actionFeatureSave.md | 9 ++- .../list-of-hooks/actionFeatureValueDelete.md | 9 ++- .../list-of-hooks/actionFeatureValueSave.md | 7 +-- .../actionFilterDeliveryOptionList.md | 13 +++-- ...rontControllerDetectContextCountryAfter.md | 2 +- .../actionFrontControllerInitAfter.md | 7 +-- .../actionFrontControllerInitBefore.md | 4 +- ...FrontControllerInitContextCurrencyAfter.md | 2 +- .../actionFrontControllerSetMedia.md | 6 +- .../actionFrontControllerSetVariables.md | 4 +- ...actionFrontControllerSetVariablesBefore.md | 2 +- .../actionGenerateDocumentReference.md | 12 ++-- .../actionGetAdminOrderButtons.md | 6 +- .../actionGetAdminToolbarButtons.md | 4 +- .../actionGetAlternativeSearchPanels.md | 4 +- .../actionGetExtraMailTemplateVars.md | 6 +- .../actionGetIDZoneByAddressID.md | 6 +- .../actionGetProductPropertiesAfter.md | 6 +- ...ctionGetProductPropertiesAfterUnitPrice.md | 4 +- .../actionGetProductPropertiesBefore.md | 6 +- .../list-of-hooks/actionHtaccessCreate.md | 5 +- .../actionInvoiceNumberFormatted.md | 6 +- .../actionLanguageLinkParameters.md | 2 +- .../list-of-hooks/actionLoggerLogMessage.md | 22 +++---- .../actionMailAlterMessageBeforeSend.md | 10 ++-- .../actionModifyFrontendSitemap.md | 9 ++- .../list-of-hooks/actionModuleInstallAfter.md | 6 +- .../actionModuleInstallBefore.md | 6 +- .../actionModuleMailAlertSendCustomer.md | 18 +++--- .../actionModuleRegisterHookAfter.md | 15 ++--- .../actionModuleRegisterHookBefore.md | 15 ++--- .../actionModuleUnRegisterHookAfter.md | 11 ++-- .../actionModuleUnRegisterHookBefore.md | 9 ++- .../actionModuleUninstallAfter.md | 6 +- .../actionModuleUninstallBefore.md | 6 +- .../actionNewsletterRegistrationAfter.md | 2 +- .../actionNewsletterRegistrationBefore.md | 2 +- .../list-of-hooks/actionObjectAddAfter.md | 6 +- .../list-of-hooks/actionObjectAddBefore.md | 6 +- .../list-of-hooks/actionObjectDeleteAfter.md | 6 +- .../list-of-hooks/actionObjectDeleteBefore.md | 6 +- ...actionObjectProductCommentValidateAfter.md | 2 +- .../actionObjectProductInCartDeleteAfter.md | 4 +- .../actionObjectProductInCartDeleteBefore.md | 4 +- .../list-of-hooks/actionObjectUpdateAfter.md | 6 +- .../list-of-hooks/actionObjectUpdateBefore.md | 6 +- .../list-of-hooks/actionOnImageCutAfter.md | 6 +- .../list-of-hooks/actionOnImageResizeAfter.md | 6 +- .../hooks/list-of-hooks/actionOrderEdited.md | 6 +- .../actionOrderHistoryAddAfter.md | 8 +-- .../hooks/list-of-hooks/actionOrderReturn.md | 7 +-- .../hooks/list-of-hooks/actionOrderSlipAdd.md | 10 ++-- .../actionOrderStatusPostUpdate.md | 9 ++- .../list-of-hooks/actionOrderStatusUpdate.md | 9 ++- .../list-of-hooks/actionOutputHTMLBefore.md | 4 +- .../actionOverrideEmployeeImage.md | 4 +- .../actionOverrideShippingFreePrice.md | 27 +++++++++ .../actionOverrideShippingFreeWeight.md | 27 +++++++++ .../list-of-hooks/actionPDFInvoiceRender.md | 8 +-- .../list-of-hooks/actionPasswordRenew.md | 6 +- .../hooks/list-of-hooks/actionPaymentCCAdd.md | 7 +-- .../actionPaymentConfirmation.md | 9 ++- .../hooks/list-of-hooks/actionPresentCart.md | 6 +- .../list-of-hooks/actionPresentCategory.md | 2 +- .../actionPresentManufacturer.md | 2 +- .../list-of-hooks/actionPresentModule.md | 6 +- .../list-of-hooks/actionPresentObject.md | 2 +- .../hooks/list-of-hooks/actionPresentOrder.md | 4 +- .../list-of-hooks/actionPresentOrderReturn.md | 4 +- .../actionPresentPaymentOptions.md | 4 +- .../list-of-hooks/actionPresentProduct.md | 4 +- .../actionPresentProductListing.md | 4 +- .../hooks/list-of-hooks/actionPresentStore.md | 2 +- .../list-of-hooks/actionPresentSupplier.md | 2 +- .../hooks/list-of-hooks/actionProductAdd.md | 11 ++-- .../actionProductAttributeDelete.md | 9 ++- .../actionProductAttributeUpdate.md | 9 ++- .../list-of-hooks/actionProductCancel.md | 11 ++-- .../list-of-hooks/actionProductCoverage.md | 16 ++--- .../list-of-hooks/actionProductDelete.md | 7 +-- .../list-of-hooks/actionProductOutOfStock.md | 6 +- .../actionProductPriceCalculation.md | 58 +++++++++---------- .../hooks/list-of-hooks/actionProductSave.md | 7 +-- .../list-of-hooks/actionProductSearchAfter.md | 2 +- ...ctionProductSearchProviderRunQueryAfter.md | 4 +- ...tionProductSearchProviderRunQueryBefore.md | 4 +- .../list-of-hooks/actionProductUpdate.md | 9 ++- .../hooks/list-of-hooks/actionSearch.md | 6 +- .../hooks/list-of-hooks/actionSetInvoice.md | 6 +- .../actionShopDataDuplication.md | 6 +- .../actionSubmitAccountBefore.md | 13 ++--- .../actionSubmitCustomerAddressForm.md | 6 +- .../list-of-hooks/actionUpdateCartAddress.md | 2 +- .../list-of-hooks/actionUpdateLangAfter.md | 4 +- .../list-of-hooks/actionUpdateQuantity.md | 35 ++++------- .../list-of-hooks/actionValidateCartRule.md | 2 +- .../actionValidateCustomerAddressForm.md | 4 +- .../list-of-hooks/actionValidateOrder.md | 4 +- .../list-of-hooks/actionValidateOrderAfter.md | 4 +- .../actionValidateOrderBefore.md | 2 +- .../actionValidateStepComplete.md | 6 +- .../hooks/list-of-hooks/actionWatermark.md | 30 ++++------ .../list-of-hooks/actionWishlistAddProduct.md | 4 +- .../list-of-hooks/addWebserviceResources.md | 8 +-- .../additionalCustomerAddressFields.md | 6 +- .../additionalCustomerFormFields.md | 6 +- .../hooks/list-of-hooks/dashboardData.md | 8 +-- .../hooks/list-of-hooks/dashboardZoneOne.md | 8 +-- .../hooks/list-of-hooks/dashboardZoneThree.md | 6 +- .../hooks/list-of-hooks/dashboardZoneTwo.md | 8 +-- .../list-of-hooks/deleteProductAttribute.md | 10 ++-- .../displayAdditionalCustomerAddressFields.md | 4 +- .../displayAddressSelectorBottom.md | 4 +- .../list-of-hooks/displayAdminAfterHeader.md | 8 +-- .../list-of-hooks/displayAdminCustomers.md | 4 +- .../list-of-hooks/displayAdminEndContent.md | 6 +- .../hooks/list-of-hooks/displayAdminForm.md | 6 +- .../displayAdminGridTableAfter.md | 10 ++-- .../displayAdminGridTableBefore.md | 10 ++-- .../list-of-hooks/displayAdminListAfter.md | 8 +-- .../list-of-hooks/displayAdminListBefore.md | 8 +-- .../hooks/list-of-hooks/displayAdminLogin.md | 2 +- .../displayAdminNavBarBeforeEnd.md | 8 +-- .../list-of-hooks/displayAdminOptions.md | 6 +- .../hooks/list-of-hooks/displayAdminOrder.md | 8 +-- .../displayAdminOrderCreateExtraButtons.md | 4 +- .../list-of-hooks/displayAdminOrderMain.md | 4 +- .../displayAdminOrderMainBottom.md | 4 +- .../list-of-hooks/displayAdminOrderSide.md | 4 +- .../displayAdminOrderSideBottom.md | 6 +- .../list-of-hooks/displayAdminStatsModules.md | 9 ++- .../displayAdminThemesListAfter.md | 4 +- .../hooks/list-of-hooks/displayAdminView.md | 6 +- .../displayAfterBodyOpeningTag.md | 4 +- .../list-of-hooks/displayAfterCarrier.md | 6 +- .../displayAfterProductThumbs.md | 4 +- .../list-of-hooks/displayAfterTitleTag.md | 4 +- .../displayBackOfficeEmployeeMenu.md | 19 +++--- .../list-of-hooks/displayBackOfficeFooter.md | 6 +- .../list-of-hooks/displayBackOfficeHeader.md | 14 ++--- .../list-of-hooks/displayBackOfficeTop.md | 14 ++--- .../hooks/list-of-hooks/displayBanner.md | 4 +- .../displayBeforeBodyClosingTag.md | 4 +- .../list-of-hooks/displayBeforeCarrier.md | 7 +-- .../displayCMSDisputeInformation.md | 4 +- .../list-of-hooks/displayCMSPrintButton.md | 4 +- .../displayCarrierExtraContent.md | 8 +-- .../displayCartExtraProductActions.md | 4 +- .../list-of-hooks/displayCartModalContent.md | 4 +- .../list-of-hooks/displayCartModalFooter.md | 4 +- .../displayCheckoutBeforeConfirmation.md | 4 +- .../displayCheckoutSubtotalDetails.md | 4 +- .../displayCheckoutSummaryTop.md | 4 +- .../list-of-hooks/displayContactContent.md | 4 +- .../list-of-hooks/displayContactLeftColumn.md | 4 +- .../displayContactRightColumn.md | 4 +- .../displayContentWrapperBottom.md | 2 +- .../list-of-hooks/displayContentWrapperTop.md | 2 +- .../displayCrossSellingShoppingCart.md | 4 +- .../list-of-hooks/displayCustomerAccount.md | 4 +- .../displayCustomerAccountForm.md | 9 ++- .../displayCustomerAccountFormTop.md | 11 ++-- .../displayCustomerLoginFormAfter.md | 4 +- .../list-of-hooks/displayCustomization.md | 8 +-- .../displayDashboardToolbarIcons.md | 2 +- .../displayDashboardToolbarTopMenu.md | 6 +- .../list-of-hooks/displayDashboardTop.md | 8 +-- .../displayEmptyModuleCategoryExtraMessage.md | 2 +- .../list-of-hooks/displayExpressCheckout.md | 4 +- .../hooks/list-of-hooks/displayFeatureForm.md | 2 +- .../displayFeaturePostProcess.md | 2 +- .../list-of-hooks/displayFeatureValueForm.md | 2 +- .../displayFeatureValuePostProcess.md | 2 +- .../hooks/list-of-hooks/displayFooter.md | 4 +- .../hooks/list-of-hooks/displayFooterAfter.md | 4 +- .../list-of-hooks/displayFooterBefore.md | 4 +- .../list-of-hooks/displayFooterCategory.md | 2 +- .../list-of-hooks/displayFooterProduct.md | 4 +- .../hooks/list-of-hooks/displayGDPRConsent.md | 2 +- .../hooks/list-of-hooks/displayHeader.md | 9 ++- .../list-of-hooks/displayHeaderCategory.md | 2 +- .../hooks/list-of-hooks/displayHome.md | 9 ++- .../displayInvoiceLegalFreeText.md | 4 +- .../hooks/list-of-hooks/displayLeftColumn.md | 2 +- .../list-of-hooks/displayLeftColumnProduct.md | 4 +- .../hooks/list-of-hooks/displayMaintenance.md | 6 +- .../displayModuleConfigureExtraButtons.md | 2 +- .../list-of-hooks/displayMyAccountBlock.md | 2 +- .../hooks/list-of-hooks/displayNav1.md | 2 +- .../hooks/list-of-hooks/displayNav2.md | 2 +- .../list-of-hooks/displayNavFullWidth.md | 4 +- .../displayNewsletterRegistration.md | 2 +- .../hooks/list-of-hooks/displayNotFound.md | 2 +- .../list-of-hooks/displayOrderConfirmation.md | 11 ++-- .../displayOrderConfirmation1.md | 2 +- .../displayOrderConfirmation2.md | 2 +- .../hooks/list-of-hooks/displayOrderDetail.md | 2 +- .../list-of-hooks/displayOrderPreview.md | 6 +- .../list-of-hooks/displayOverrideTemplate.md | 22 +++---- .../list-of-hooks/displayPaymentByBinaries.md | 4 +- .../list-of-hooks/displayPaymentReturn.md | 9 ++- .../hooks/list-of-hooks/displayPaymentTop.md | 4 +- .../displayPersonalInformationTop.md | 4 +- .../list-of-hooks/displayProductActions.md | 4 +- .../displayProductAdditionalInfo.md | 4 +- .../displayProductExtraContent.md | 6 +- .../displayProductListReviews.md | 2 +- .../list-of-hooks/displayProductPriceBlock.md | 2 +- .../hooks/list-of-hooks/displayReassurance.md | 2 +- .../hooks/list-of-hooks/displayRightColumn.md | 2 +- .../displayRightColumnProduct.md | 4 +- .../hooks/list-of-hooks/displaySearch.md | 2 +- .../list-of-hooks/displayShoppingCart.md | 4 +- .../displayShoppingCartFooter.md | 4 +- .../hooks/list-of-hooks/displayTop.md | 4 +- .../list-of-hooks/displayWrapperBottom.md | 2 +- .../hooks/list-of-hooks/displayWrapperTop.md | 2 +- .../list-of-hooks/filterCategoryContent.md | 12 ++-- .../list-of-hooks/filterCmsCategoryContent.md | 20 +++---- .../hooks/list-of-hooks/filterCmsContent.md | 20 +++---- .../hooks/list-of-hooks/filterHtmlContent.md | 8 +-- .../filterManufacturerContent.md | 28 ++++----- .../list-of-hooks/filterProductContent.md | 24 ++++---- .../list-of-hooks/filterProductSearch.md | 8 +-- .../list-of-hooks/filterSupplierContent.md | 24 ++++---- .../hooks/list-of-hooks/gSitemapAppendUrls.md | 2 +- .../hooks/list-of-hooks/legacyblockkpi.md | 2 +- .../hooks/list-of-hooks/moduleRoutes.md | 11 ++-- .../list-of-hooks/overrideLayoutTemplate.md | 8 +-- .../overrideMinimalPurchasePrice.md | 10 ++-- .../list-of-hooks/productSearchProvider.md | 8 +-- .../sendMailAlterTemplateVars.md | 6 +- .../hooks/list-of-hooks/termsAndConditions.md | 8 +-- .../validateCustomerFormFields.md | 6 +- 340 files changed, 1038 insertions(+), 1053 deletions(-) create mode 100644 modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreePrice.md create mode 100644 modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreeWeight.md diff --git a/modules/concepts/hooks/list-of-hooks/actionAfter.md b/modules/concepts/hooks/list-of-hooks/actionAfter.md index 20900ff9ab..3ff9756de6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionBefore.md b/modules/concepts/hooks/list-of-hooks/actionBefore.md index 2224aafead..0deae94b98 100644 --- a/modules/concepts/hooks/list-of-hooks/actionBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionFormModifier.md b/modules/concepts/hooks/list-of-hooks/actionFormModifier.md index 7fae447e97..e763b72b3a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFormModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionFormModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md b/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md index 42cfb8b657..9ea06ce653 100644 --- a/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md b/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md index 1590ac25ba..face7eadd2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionOptionsModifier.md b/modules/concepts/hooks/list-of-hooks/actionOptionsModifier.md index 904817330b..9e7ddd8d0e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOptionsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionOptionsModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionGridDataModifier.md b/modules/concepts/hooks/list-of-hooks/actionGridDataModifier.md index 392147524c..db063a20dc 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGridDataModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionGridDataModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Grid/GridFactory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Grid/GridFactory.php' file: src/Core/Grid/GridFactory.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionGridDefinitionModifier.md b/modules/concepts/hooks/list-of-hooks/actionGridDefinitionModifier.md index ff1c8e14ef..b9d5fcd6b0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGridDefinitionModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionGridDefinitionModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Grid/Definition/Factory/AbstractGridDefinitionFactory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Grid/Definition/Factory/AbstractGridDefinitionFactory.php' file: src/Core/Grid/Definition/Factory/AbstractGridDefinitionFactory.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionGridFilterFormModifier.md b/modules/concepts/hooks/list-of-hooks/actionGridFilterFormModifier.md index 0e948b1ac5..19bd5a5d70 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGridFilterFormModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionGridFilterFormModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Grid/Filter/GridFilterFormFactory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Grid/Filter/GridFilterFormFactory.php' file: src/Core/Grid/Filter/GridFilterFormFactory.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionGridPresenterModifier.md b/modules/concepts/hooks/list-of-hooks/actionGridPresenterModifier.md index 71751e4664..e987e62fe6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGridPresenterModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionGridPresenterModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Grid/Presenter/GridPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Grid/Presenter/GridPresenter.php' file: src/Core/Grid/Presenter/GridPresenter.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionGridQueryBuilderModifier.md b/modules/concepts/hooks/list-of-hooks/actionGridQueryBuilderModifier.md index 94b0fe8916..af92bdaacf 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGridQueryBuilderModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionGridQueryBuilderModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Grid/Data/Factory/DoctrineGridDataFactory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Grid/Data/Factory/DoctrineGridDataFactory.php' file: src/Core/Grid/Data/Factory/DoctrineGridDataFactory.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionFormBuilderModifier.md b/modules/concepts/hooks/list-of-hooks/actionFormBuilderModifier.md index fe2b83ffbe..b02c198c13 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFormBuilderModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionFormBuilderModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Form/IdentifiableObject/Builder/FormBuilder.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Form/IdentifiableObject/Builder/FormBuilder.php' file: src/Core/Form/IdentifiableObject/Builder/FormBuilder.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionFormDataProviderData.md b/modules/concepts/hooks/list-of-hooks/actionFormDataProviderData.md index 2f29280d22..8418a66c88 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFormDataProviderData.md +++ b/modules/concepts/hooks/list-of-hooks/actionFormDataProviderData.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Form/IdentifiableObject/Builder/FormBuilder.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Form/IdentifiableObject/Builder/FormBuilder.php' file: src/Core/Form/IdentifiableObject/Builder/FormBuilder.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionFormDataProviderDefaultData.md b/modules/concepts/hooks/list-of-hooks/actionFormDataProviderDefaultData.md index 184717556e..ec144eaad0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFormDataProviderDefaultData.md +++ b/modules/concepts/hooks/list-of-hooks/actionFormDataProviderDefaultData.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Form/IdentifiableObject/Builder/FormBuilder.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Form/IdentifiableObject/Builder/FormBuilder.php' file: src/Core/Form/IdentifiableObject/Builder/FormBuilder.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md b/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md index d8fde6b0f0..2d6a8509af 100644 --- a/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/8.2.x/src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php' file: src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md b/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md index f1ff6b6b73..3c837a6e06 100644 --- a/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/8.2.x/src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php' file: src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAfter.md b/modules/concepts/hooks/list-of-hooks/actionAdminAfter.md index 46e617475e..5dd54aca38 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminBefore.md index d645e4c593..5fb86a7fcb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAdminShopParametersMetaControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdminShopParametersMetaControllerPostProcessBefore.md index 0091858bfe..3010f00ebd 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdminShopParametersMetaControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdminShopParametersMetaControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Configure Shop Parameters Meta Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MetaController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MetaController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MetaController.php locations: - 'back office' @@ -23,5 +23,5 @@ description: 'This hook is called on Admin Configure Shop Parameters Meta post-p ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminAdminShopParametersMetaControllerPostProcessBefore', ['controller' => $this]) +dispatchHookWithParameters('actionAdminAdminShopParametersMetaControllerPostProcessBefore', ['controller' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAdminWebserviceControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdminWebserviceControllerPostProcessBefore.md index f3c8b767f2..db0cd69e63 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdminWebserviceControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdminWebserviceControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/WebserviceController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/WebserviceController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/WebserviceController.php locations: - 'back office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminAdminWebserviceControllerPostProcessBefore', ['controller' => $this]) +dispatchHookWithParameters('actionAdminAdminWebserviceControllerPostProcessBefore', ['controller' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md index 97179e60dd..d6eb47595a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/AdministrationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/AdministrationController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/AdministrationController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md index d8f08c9ae3..e37fecd766 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Configure Advanced Parameters Administration Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/AdministrationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/AdministrationController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/AdministrationController.php locations: - 'back office' @@ -23,5 +23,5 @@ description: 'This hook is called on Admin Configure Advanced Parameters Adminis ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminAdministrationControllerPostProcessBefore', ['controller' => $this]) +dispatchHookWithParameters('actionAdminAdministrationControllerPostProcessBefore', ['controller' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md index 8ea489393b..e9ba430dc0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/PerformanceController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/PerformanceController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/PerformanceController.php locations: - 'back office' @@ -23,7 +23,7 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook( +dispatchHookWithParameters( 'actionAdminAdvancedParametersPerformanceControllerPostProcess' . $hookName . 'Before', ['controller' => $this] ) diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md index a36bf36efd..248991f649 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Configure Advanced Parameters Performance Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/PerformanceController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/PerformanceController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/PerformanceController.php locations: - 'back office' @@ -23,5 +23,5 @@ description: 'This hook is called on Admin Configure Advanced Parameters Perform ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminAdvancedParametersPerformanceControllerPostProcessBefore', ['controller' => $this]) +dispatchHookWithParameters('actionAdminAdvancedParametersPerformanceControllerPostProcessBefore', ['controller' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminBreadcrumbModifier.md b/modules/concepts/hooks/list-of-hooks/actionAdminBreadcrumbModifier.md index 0bc5b401d5..b31c824e88 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminBreadcrumbModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminBreadcrumbModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Modify back office breadcrumb' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/PrestaShopBundle/Twig/Component/Toolbar.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Twig/Component/Toolbar.php' file: src/PrestaShopBundle/Twig/Component/Toolbar.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitAfter.md b/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitAfter.md index a6575db621..1c3c087583 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Perform actions after admin controller initialization' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' @@ -28,5 +28,5 @@ Hook::exec( [ 'controller' => $this, ] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitBefore.md index 7722887d45..88102a8731 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Perform actions before admin controller initialization' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' @@ -28,5 +28,5 @@ Hook::exec( [ 'controller' => $this, ] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md b/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md index 715736c42f..87601e7096 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md @@ -1,11 +1,11 @@ --- Title: actionAdminControllerSetMedia hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Bridge/AdminController/LegacyControllerBridge.php' - file: src/PrestaShopBundle/Bridge/AdminController/LegacyControllerBridge.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Twig/Component/HeadTag.php' + file: src/PrestaShopBundle/Twig/Component/HeadTag.php locations: - 'back office' type: action @@ -24,9 +24,15 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchWithParameters('actionAdminControllerSetMedia') +$this->hookDispatcher->dispatchWithParameters('actionAdminControllerSetMedia'); ``` ## Example implementation +This hook has been implemented as an example in our +[modules examples repository - demoextendgrid](https://github.com/PrestaShop/example-modules/tree/master/demoextendgrid). -This hook has been implemented as an example in our [modules examples repository - demoextendgrid](https://github.com/PrestaShop/example-modules/tree/master/demoextendgrid). +{{% callout type="warning" %}} +In PrestaShop 9, this hook is dispatched from a Twig component. +The methods `addJqueryPlugin()` and `addJqueryUI()` may not be available +on migrated Symfony pages. Use `addJS()` and `addCSS()` instead. +{{% /callout %}} \ No newline at end of file diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md index 84e745a244..977f1491be 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md @@ -1,10 +1,10 @@ --- Title: actionAdminDuplicateAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Product/Update/ProductDuplicator.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Update/ProductDuplicator.php' file: src/Adapter/Product/Update/ProductDuplicator.php locations: - 'back office' @@ -24,7 +24,7 @@ description: '' ```php $this->hookDispatcher->dispatchWithParameters( - 'actionAdminDuplicateAfter', - ['id_product' => $oldProductId, 'id_product_new' => $newProductId] -); + 'actionAdminDuplicateAfter', + ['id_product' => $oldProductId, 'id_product_new' => $newProductId] + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md index e7735ce449..ebebe26fac 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md @@ -1,10 +1,10 @@ --- Title: actionAdminDuplicateBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Product/Update/ProductDuplicator.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Update/ProductDuplicator.php' file: src/Adapter/Product/Update/ProductDuplicator.php locations: - 'back office' @@ -24,7 +24,7 @@ description: '' ```php $this->hookDispatcher->dispatchWithParameters( - 'actionAdminDuplicateBefore', - ['id_product' => $oldProductId] -); + 'actionAdminDuplicateBefore', + ['id_product' => $oldProductId] + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md index d147a07402..dc700e8fec 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Improve/International/GeolocationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Improve/International/GeolocationController.php' file: src/PrestaShopBundle/Controller/Admin/Improve/International/GeolocationController.php locations: - 'back office' @@ -23,7 +23,7 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook( +dispatchHookWithParameters( 'actionAdminInternationalGeolocationControllerPostProcess' . $hookName . 'Before', ['controller' => $this] ) diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md index 01d3860915..2955d96728 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Improve International Geolocation Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Improve/International/GeolocationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Improve/International/GeolocationController.php' file: src/PrestaShopBundle/Controller/Admin/Improve/International/GeolocationController.php locations: - 'back office' @@ -23,5 +23,5 @@ description: 'This hook is called on Admin Improve International Geolocation pos ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminInternationalGeolocationControllerPostProcessBefore', ['controller' => $this]) +dispatchHookWithParameters('actionAdminInternationalGeolocationControllerPostProcessBefore', ['controller' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md index bf0c3f7298..96a54b3d15 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Improve/International/LocalizationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Improve/International/LocalizationController.php' file: src/PrestaShopBundle/Controller/Admin/Improve/International/LocalizationController.php locations: - 'back office' @@ -23,7 +23,7 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook( +dispatchHookWithParameters( 'actionAdminInternationalLocalizationControllerPostProcess' . $hookName . 'Before', ['controller' => $this] ) diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md index a6a095045b..789950acf7 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Improve International Localization Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Improve/International/LocalizationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Improve/International/LocalizationController.php' file: src/PrestaShopBundle/Controller/Admin/Improve/International/LocalizationController.php locations: - 'back office' @@ -23,5 +23,5 @@ description: 'This hook is called on Admin Improve International Localization po ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminInternationalLocalizationControllerPostProcessBefore', ['controller' => $this]) +dispatchHookWithParameters('actionAdminInternationalLocalizationControllerPostProcessBefore', ['controller' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminLoginControllerSetMedia.md b/modules/concepts/hooks/list-of-hooks/actionAdminLoginControllerSetMedia.md index 43be5bcf98..f43a4b5c32 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminLoginControllerSetMedia.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminLoginControllerSetMedia.md @@ -4,8 +4,8 @@ hidden: true hookTitle: 'Set media on admin login page header' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminLoginController.php' - file: controllers/admin/AdminLoginController.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Twig/Component/Login/LoginHeadTag.php' + file: src/PrestaShopBundle/Twig/Component/Login/LoginHeadTag.php locations: - 'back office' type: action @@ -23,10 +23,10 @@ description: 'This hook is called after adding media to admin login page header' ## Call of the Hook in the origin file ```php -Hook::exec( +$this->hookDispatcher->dispatchWithParameters( 'actionAdminLoginControllerSetMedia', [ - 'controller' => $this, + 'controller' => $this->legacyControllerContext, ] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminLogsControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminLogsControllerPostProcessBefore.md index beb65c9644..87fd7f9e00 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminLogsControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminLogsControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/LogsController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/LogsController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/LogsController.php locations: - 'back office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminLogsControllerPostProcessBefore', ['controller' => $this]) +dispatchHookWithParameters('actionAdminLogsControllerPostProcessBefore', ['controller' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminMaintenanceControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminMaintenanceControllerPostProcessBefore.md index 549ab18a65..1dabba86c4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMaintenanceControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMaintenanceControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MaintenanceController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MaintenanceController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MaintenanceController.php locations: - 'back office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminMaintenanceControllerPostProcessBefore', ['controller' => $this]) +dispatchHookWithParameters('actionAdminMaintenanceControllerPostProcessBefore', ['controller' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminMenuTabsModifier.md b/modules/concepts/hooks/list-of-hooks/actionAdminMenuTabsModifier.md index 085542232a..82f9aa19a4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMenuTabsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMenuTabsModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Modify back office menu' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md b/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md index 6aee19c05b..96a1db73e4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md @@ -1,10 +1,10 @@ --- Title: actionAdminMetaAfterWriteRobotsFile hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Tools.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' file: classes/Tools.php locations: - 'back office' @@ -36,5 +36,5 @@ description: '' Hook::exec('actionAdminMetaAfterWriteRobotsFile', [ 'rb_data' => $robots_content, 'write_fd' => &$write_fd, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminMetaBeforeWriteRobotsFile.md b/modules/concepts/hooks/list-of-hooks/actionAdminMetaBeforeWriteRobotsFile.md index 0abaedbd58..39d78d459a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMetaBeforeWriteRobotsFile.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMetaBeforeWriteRobotsFile.md @@ -1,10 +1,10 @@ --- Title: actionAdminMetaBeforeWriteRobotsFile hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Tools.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' file: classes/Tools.php locations: - 'back office' @@ -34,5 +34,5 @@ description: '' ```php Hook::exec('actionAdminMetaBeforeWriteRobotsFile', [ 'rb_data' => &$robots_content, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminMetaSave.md b/modules/concepts/hooks/list-of-hooks/actionAdminMetaSave.md index faf0cfd53a..e1da4dc1f0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMetaSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMetaSave.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'After saving the configuration in AdminMeta' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Meta/CommandHandler/AddMetaHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Meta/CommandHandler/AddMetaHandler.php' file: src/Adapter/Meta/CommandHandler/AddMetaHandler.php locations: - 'back office' type: action -hookAliases: - - afterSaveAdminMeta +hookAliases: actionAdminMetaSave array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is displayed after saving the configuration in AdminMeta ## Call of the Hook in the origin file ```php -dispatchWithParameters('actionAdminMetaSave') +$this->hookDispatcher->dispatchWithParameters('actionAdminMetaSave'); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminOrdersTrackingNumberUpdate.md b/modules/concepts/hooks/list-of-hooks/actionAdminOrdersTrackingNumberUpdate.md index fcfb0f5873..35590303c5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminOrdersTrackingNumberUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminOrdersTrackingNumberUpdate.md @@ -4,14 +4,14 @@ hidden: true hookTitle: 'After setting the tracking number for the order' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Order/CommandHandler/UpdateOrderShippingDetailsHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/UpdateOrderShippingDetailsHandler.php' file: src/Adapter/Order/CommandHandler/UpdateOrderShippingDetailsHandler.php locations: - 'back office' type: action hookAliases: array_return: false -check_exceptions: false +check_exceptions: true chain: false origin: core description: 'This hook allows you to execute code after the unique tracking number for the order was added' @@ -38,5 +38,5 @@ Hook::exec('actionAdminOrdersTrackingNumberUpdate', [ 'order' => $order, 'customer' => $customer, 'carrier' => $carrier, - ], null, false, true, false, $order->id_shop) + ], null, false, true, false, $order->id_shop); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminPreferencesControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminPreferencesControllerPostProcessBefore.md index 4fce450a74..c4c5d10824 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminPreferencesControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/PreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/PreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/PreferencesController.php locations: - 'back office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminPreferencesControllerPostProcessBefore', ['controller' => $this]) +dispatchHookWithParameters('actionAdminPreferencesControllerPostProcessBefore', ['controller' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingFieldsModifier.md b/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingFieldsModifier.md index 34016c9b65..3d5ac36aee 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingFieldsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingFieldsModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Product/AdminProductDataProvider.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/8.2.x/src/Adapter/Product/AdminProductDataProvider.php' file: src/Adapter/Product/AdminProductDataProvider.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingResultsModifier.md b/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingResultsModifier.md index b2ede53889..6e2e56988c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingResultsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingResultsModifier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Product/AdminProductDataProvider.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/8.2.x/src/Adapter/Product/AdminProductDataProvider.php' file: src/Adapter/Product/AdminProductDataProvider.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminSecurityControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminSecurityControllerPostProcessBefore.md index 855f79423a..c0ce7a4c12 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminSecurityControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminSecurityControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Security Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/SecurityController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/SecurityController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/AdvancedParameters/SecurityController.php locations: - 'back office' @@ -23,5 +23,5 @@ description: 'This hook is called on Admin Security Controller post-process befo ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminSecurityControllerPostProcessBefore', ['controller' => $this]) +dispatchHookWithParameters('actionAdminSecurityControllerPostProcessBefore', ['controller' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessBefore.md index 9691f100cf..add697dd14 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Improve Shipping Preferences Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php locations: - 'back office' @@ -23,5 +23,8 @@ description: 'This hook is called on Admin Improve Shipping Preferences post-pro ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminShippingPreferencesControllerPostProcessBefore', ['controller' => $this]) +dispatchHookWithParameters( + 'actionAdminShippingPreferencesControllerPostProcessBefore', + ['controller' => $this] + ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore.md index 43f56661c4..9b5c8cc520 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Improve Shipping Preferences Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php locations: - 'back office' @@ -23,8 +23,8 @@ description: 'This hook is called on Admin Improve Shipping Preferences post-pro ## Call of the Hook in the origin file ```php -dispatchHook( +dispatchHookWithParameters( 'actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore', - ['controller' => $this] + ['controller' => $this] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessHandlingBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessHandlingBefore.md index e64ca90087..a119b11daf 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessHandlingBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessHandlingBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Improve Shipping Preferences Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Improve/Shipping/PreferencesController.php locations: - 'back office' @@ -23,7 +23,7 @@ description: 'This hook is called on Admin Improve Shipping Preferences post-pro ## Call of the Hook in the origin file ```php -dispatchHook( +dispatchHookWithParameters( 'actionAdminShippingPreferencesControllerPostProcessHandlingBefore', ['controller' => $this] ) diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersMetaControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersMetaControllerPostProcessBefore.md index 7ec255f1bb..6ebf27a85f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersMetaControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersMetaControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MetaController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MetaController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/MetaController.php locations: - 'back office' @@ -23,7 +23,7 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook( +dispatchHookWithParameters( 'actionAdminShopParametersMetaControllerPostProcess' . $hookName . 'Before', ['controller' => $this] ) diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md index bf1b26515e..735b5734f6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/OrderPreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/OrderPreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/OrderPreferencesController.php locations: - 'back office' @@ -23,7 +23,7 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook( +dispatchHookWithParameters( 'actionAdminShopParametersOrderPreferencesControllerPostProcess' . $hookName . 'Before', ['controller' => $this] ) diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md index 1f686e1525..ae1d92d573 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in Admin Configure Shop Parameters Order Preferences Controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/OrderPreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/OrderPreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/OrderPreferencesController.php locations: - 'back office' @@ -23,5 +23,5 @@ description: 'This hook is called on Admin Configure Shop Parameters Order Prefe ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminShopParametersOrderPreferencesControllerPostProcessBefore', ['controller' => $this]) +->dispatchHookWithParameters('actionAdminShopParametersOrderPreferencesControllerPostProcessBefore', ['controller' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md index 77d2fbc4c6..003d00171f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/ProductPreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/ProductPreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/ProductPreferencesController.php locations: - 'back office' @@ -23,7 +23,7 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook( +dispatchHookWithParameters( 'actionAdminShopParametersProductPreferencesControllerPostProcess' . $hookName . 'Before', ['controller' => $this] ) diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md index b0222b9133..bb4b66c4a6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/ProductPreferencesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/ProductPreferencesController.php' file: src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/ProductPreferencesController.php locations: - 'back office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHook('actionAdminShopParametersProductPreferencesControllerPostProcessBefore', ['controller' => $this]) +dispatchHookWithParameters('actionAdminShopParametersProductPreferencesControllerPostProcessBefore', ['controller' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdate_optionsAfter.md b/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdate_optionsAfter.md index 6472575752..24187169a2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdate_optionsAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdate_optionsAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Shop/CommandHandler/UploadLogosHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Shop/CommandHandler/UploadLogosHandler.php' file: src/Adapter/Shop/CommandHandler/UploadLogosHandler.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdateoptionsAfter.md b/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdateoptionsAfter.md index 4113988c27..17a723ac9e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdateoptionsAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdateoptionsAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Shop/CommandHandler/UploadLogosHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Shop/CommandHandler/UploadLogosHandler.php' file: src/Adapter/Shop/CommandHandler/UploadLogosHandler.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAfterCreateFormHandler.md b/modules/concepts/hooks/list-of-hooks/actionAfterCreateFormHandler.md index c857240c11..54291b036e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAfterCreateFormHandler.md +++ b/modules/concepts/hooks/list-of-hooks/actionAfterCreateFormHandler.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' file: src/Core/Form/IdentifiableObject/Handler/FormHandler.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAfterLoadRoutes.md b/modules/concepts/hooks/list-of-hooks/actionAfterLoadRoutes.md index 5108267357..406e3150c4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAfterLoadRoutes.md +++ b/modules/concepts/hooks/list-of-hooks/actionAfterLoadRoutes.md @@ -1,10 +1,10 @@ --- Title: actionAfterLoadRoutes hidden: true -hookTitle: +hookTitle: 'Triggers after loading routes' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.1.x/classes/Dispatcher.php#L708' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Dispatcher.php' file: classes/Dispatcher.php locations: - 'front office' @@ -15,7 +15,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: '' +description: 'Allow modules to modify routes in any way or add their own multilanguage routes.' --- diff --git a/modules/concepts/hooks/list-of-hooks/actionAfterUpdateFormHandler.md b/modules/concepts/hooks/list-of-hooks/actionAfterUpdateFormHandler.md index b27b350f07..fdd7952bf5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAfterUpdateFormHandler.md +++ b/modules/concepts/hooks/list-of-hooks/actionAfterUpdateFormHandler.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' file: src/Core/Form/IdentifiableObject/Handler/FormHandler.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAjaxDieBefore.md b/modules/concepts/hooks/list-of-hooks/actionAjaxDieBefore.md index 3220b013d8..d079fb11cd 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAjaxDieBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAjaxDieBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/Controller.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/Controller.php' file: classes/controller/Controller.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md b/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md index 069259493f..0fd375530e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md @@ -1,10 +1,10 @@ --- Title: actionAttributeCombinationDelete hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Combination.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Combination.php' file: classes/Combination.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionAttributeCombinationDelete', ['id_product_attribute' => (int) $this->id]) +Hook::exec('actionAttributeCombinationDelete', ['id_product_attribute' => (int) $this->id]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationSave.md b/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationSave.md index a5e7c5e9fd..7d8fce1cc1 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationSave.md @@ -1,11 +1,11 @@ --- Title: actionAttributeCombinationSave hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Combination.php' - file: classes/Combination.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Combination/Create/CombinationCreator.php' + file: src/Adapter/Product/Combination/Create/CombinationCreator.php locations: - 'front office' type: action @@ -23,5 +23,8 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionAttributeCombinationSave', ['id_product_attribute' => (int) $this->id, 'id_attributes' => $idsAttribute]) +$this->hookDispatcher->dispatchWithParameters( + 'actionAttributeCombinationSave', + ['id_product_attribute' => (int) $combination->id, 'id_attributes' => $generatedCombination] + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeDelete.md b/modules/concepts/hooks/list-of-hooks/actionAttributeDelete.md index 3af0405ecb..0a7a27a310 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeDelete.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Deleting an attributes features value' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ProductAttribute.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ProductAttribute.php' file: classes/ProductAttribute.php locations: - 'front office' type: action -hookAliases: - - afterDeleteAttribute +hookAliases: actionAttributeDelete array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is called while deleting an attributes features value' ## Call of the Hook in the origin file ```php -Hook::exec('actionAttributeDelete', ['id_attribute' => $this->id]) +Hook::exec('actionAttributeDelete', ['id_attribute' => $this->id]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeGroupDelete.md b/modules/concepts/hooks/list-of-hooks/actionAttributeGroupDelete.md index 188aea18a0..39e606cf64 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeGroupDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeGroupDelete.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Deleting attribute group' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/AttributeGroup.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/AttributeGroup.php' file: classes/AttributeGroup.php locations: - 'front office' type: action -hookAliases: - - afterDeleteAttributeGroup +hookAliases: actionAttributeGroupDelete array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is called while deleting an attributes group' ## Call of the Hook in the origin file ```php -Hook::exec('actionAttributeGroupDelete', ['id_attribute_group' => $this->id]) +Hook::exec('actionAttributeGroupDelete', ['id_attribute_group' => $this->id]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeGroupSave.md b/modules/concepts/hooks/list-of-hooks/actionAttributeGroupSave.md index 18a7ee0e12..286050ba65 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeGroupSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeGroupSave.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Saving an attribute group' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/AttributeGroup.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/AttributeGroup.php' file: classes/AttributeGroup.php locations: - 'front office' type: action -hookAliases: - - afterSaveAttributeGroup +hookAliases: actionAttributeGroupSave array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is called while saving an attributes group' ## Call of the Hook in the origin file ```php -Hook::exec('actionAttributeGroupSave', ['id_attribute_group' => $this->id]) +Hook::exec('actionAttributeGroupSave', ['id_attribute_group' => $this->id]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeSave.md b/modules/concepts/hooks/list-of-hooks/actionAttributeSave.md index 4e7eaa3d25..d1f40f948c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeSave.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Saving an attributes features value' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ProductAttribute.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ProductAttribute.php' file: classes/ProductAttribute.php locations: - 'front office' type: action -hookAliases: - - afterSaveAttribute +hookAliases: actionAttributeSave array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is called while saving an attributes features value' ## Call of the Hook in the origin file ```php -Hook::exec('actionAttributeSave', ['id_attribute' => $this->id]) +Hook::exec('actionAttributeSave', ['id_attribute' => $this->id]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAuthentication.md b/modules/concepts/hooks/list-of-hooks/actionAuthentication.md index 5e34707de9..07f63ef4f0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAuthentication.md +++ b/modules/concepts/hooks/list-of-hooks/actionAuthentication.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Successful customer authentication' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerLoginForm.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerLoginForm.php' file: classes/form/CustomerLoginForm.php locations: - 'front office' type: action -hookAliases: - - authentication +hookAliases: actionAuthentication array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is displayed after a customer successfully signs in' ## Call of the Hook in the origin file ```php -Hook::exec('actionAuthentication', ['customer' => $this->context->customer]) +Hook::exec('actionAuthentication', ['customer' => $this->context->customer]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAuthenticationBefore.md b/modules/concepts/hooks/list-of-hooks/actionAuthenticationBefore.md index aadb743461..b4f149b868 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAuthenticationBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAuthenticationBefore.md @@ -1,21 +1,20 @@ --- Title: actionAuthenticationBefore hidden: true -hookTitle: +hookTitle: 'Triggers before customer logs in' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerLoginForm.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerLoginForm.php' file: classes/form/CustomerLoginForm.php locations: - 'front office' type: action -hookAliases: - - actionBeforeAuthentication +hookAliases: actionAuthenticationBefore array_return: false check_exceptions: false chain: false origin: core -description: '' +description: 'Triggers after successful validation of login form, before the login process itself.' --- @@ -24,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionAuthenticationBefore') +Hook::exec('actionAuthenticationBefore'); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionBeforeAjaxDie.md b/modules/concepts/hooks/list-of-hooks/actionBeforeAjaxDie.md index 14bbe742a4..0a9317107c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionBeforeAjaxDie.md +++ b/modules/concepts/hooks/list-of-hooks/actionBeforeAjaxDie.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/Controller.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/8.2.x/classes/controller/Controller.php' file: classes/controller/Controller.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionBeforeCreateFormHandler.md b/modules/concepts/hooks/list-of-hooks/actionBeforeCreateFormHandler.md index 7eb0f0c66a..b6196ad8fc 100644 --- a/modules/concepts/hooks/list-of-hooks/actionBeforeCreateFormHandler.md +++ b/modules/concepts/hooks/list-of-hooks/actionBeforeCreateFormHandler.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' file: src/Core/Form/IdentifiableObject/Handler/FormHandler.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionBeforeUpdateFormHandler.md b/modules/concepts/hooks/list-of-hooks/actionBeforeUpdateFormHandler.md index 1caefaa01b..d974167799 100644 --- a/modules/concepts/hooks/list-of-hooks/actionBeforeUpdateFormHandler.md +++ b/modules/concepts/hooks/list-of-hooks/actionBeforeUpdateFormHandler.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Form/IdentifiableObject/Handler/FormHandler.php' file: src/Core/Form/IdentifiableObject/Handler/FormHandler.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionBuildFrontEndObject.md b/modules/concepts/hooks/list-of-hooks/actionBuildFrontEndObject.md index 1f2b646334..87e8b4da01 100644 --- a/modules/concepts/hooks/list-of-hooks/actionBuildFrontEndObject.md +++ b/modules/concepts/hooks/list-of-hooks/actionBuildFrontEndObject.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Manage elements added to the "prestashop" javascript object' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -25,5 +25,5 @@ description: 'This hook allows you to customize the "prestashop" javascript obje ```php Hook::exec('actionBuildFrontEndObject', [ 'obj' => &$object, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionBuildMailLayoutVariables.md b/modules/concepts/hooks/list-of-hooks/actionBuildMailLayoutVariables.md index 5c0f583bd5..9fafaaca98 100644 --- a/modules/concepts/hooks/list-of-hooks/actionBuildMailLayoutVariables.md +++ b/modules/concepts/hooks/list-of-hooks/actionBuildMailLayoutVariables.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Build the variables used in email layout rendering' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/MailTemplate/Layout/LayoutVariablesBuilder.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/MailTemplate/Layout/LayoutVariablesBuilder.php' file: src/Core/MailTemplate/Layout/LayoutVariablesBuilder.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionCarrierProcess.md b/modules/concepts/hooks/list-of-hooks/actionCarrierProcess.md index 2a3067ad13..58e93afda1 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCarrierProcess.md +++ b/modules/concepts/hooks/list-of-hooks/actionCarrierProcess.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Carrier process' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.0/classes/checkout/CheckoutDeliveryStep.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/CheckoutDeliveryStep.php' file: classes/checkout/CheckoutDeliveryStep.php locations: - 'front office' type: action -hookAliases: - - processCarrier +hookAliases: actionCarrierProcess array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionCarrierProcess', ['cart' => $this->getCheckoutSession()->getCart()]) +Hook::exec('actionCarrierProcess', ['cart' => $this->getCheckoutSession()->getCart()]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCarrierUpdate.md b/modules/concepts/hooks/list-of-hooks/actionCarrierUpdate.md index ab7bc611d5..db9816c895 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCarrierUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionCarrierUpdate.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Carrier Update' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminCarriersController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminCarriersController.php' file: controllers/admin/AdminCarriersController.php locations: - 'back office' type: action -hookAliases: - - updateCarrier +hookAliases: actionCarrierUpdate array_return: false check_exceptions: false chain: false @@ -27,5 +26,5 @@ description: 'This hook is called when a carrier is updated' Hook::exec('actionCarrierUpdate', [ 'id_carrier' => (int) $current_carrier->id, 'carrier' => $new_carrier, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCartGetPackageShippingCost.md b/modules/concepts/hooks/list-of-hooks/actionCartGetPackageShippingCost.md index 5c9848cc9e..a832d5a138 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCartGetPackageShippingCost.md +++ b/modules/concepts/hooks/list-of-hooks/actionCartGetPackageShippingCost.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'After getting package shipping cost value' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/Cart.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' file: classes/Cart.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionCartSave.md b/modules/concepts/hooks/list-of-hooks/actionCartSave.md index d368e8a7de..09059f25e6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCartSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionCartSave.md @@ -4,18 +4,17 @@ hidden: true hookTitle: 'Cart creation and update' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Cart.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' file: classes/Cart.php locations: - 'front office' type: action -hookAliases: - - cart +hookAliases: actionCartSave array_return: false check_exceptions: false chain: false origin: core -description: "This hook is displayed when a product is added to the cart or if the cart's content is modified" +description: 'This hook is displayed when a product is added to the cart or if the cart''s content is modified' --- @@ -24,5 +23,5 @@ description: "This hook is displayed when a product is added to the cart or if t ## Call of the Hook in the origin file ```php -Hook::exec('actionCartSave', ['cart' => $this]) +Hook::exec('actionCartSave', ['cart' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCartSummary.md b/modules/concepts/hooks/list-of-hooks/actionCartSummary.md index 246a482445..e92e9bb497 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCartSummary.md +++ b/modules/concepts/hooks/list-of-hooks/actionCartSummary.md @@ -1,16 +1,16 @@ --- Title: actionCartSummary hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Cart.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' file: classes/Cart.php locations: - 'front office' type: action hookAliases: -array_return: false +array_return: true check_exceptions: false chain: false origin: core @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionCartSummary', $summary, null, true) +Hook::exec('actionCartSummary', $summary, null, true); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCartUpdateQuantityBefore.md b/modules/concepts/hooks/list-of-hooks/actionCartUpdateQuantityBefore.md index 73578bb1eb..66f9153775 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCartUpdateQuantityBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionCartUpdateQuantityBefore.md @@ -1,21 +1,20 @@ --- Title: actionCartUpdateQuantityBefore hidden: true -hookTitle: +hookTitle: 'Triggers before product is added to cart' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Cart.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' file: classes/Cart.php locations: - 'front office' type: action -hookAliases: - - actionBeforeCartUpdateQty +hookAliases: actionCartUpdateQuantityBefore array_return: false check_exceptions: false chain: false origin: core -description: '' +description: 'Allows responding to add to cart events.' --- @@ -24,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionCartUpdateQuantityBefore', $data) +Hook::exec('actionCartUpdateQuantityBefore', $data); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCategoryAdd.md b/modules/concepts/hooks/list-of-hooks/actionCategoryAdd.md index 21fe0015e6..9dbcdfe851 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCategoryAdd.md +++ b/modules/concepts/hooks/list-of-hooks/actionCategoryAdd.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Category creation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Category.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Category.php' file: classes/Category.php locations: - 'front office' type: action -hookAliases: - - categoryAddition +hookAliases: actionCategoryAdd array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is displayed when a category is created' ## Call of the Hook in the origin file ```php -Hook::exec('actionCategoryAdd', ['category' => $this]) +Hook::exec('actionCategoryAdd', ['category' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCategoryDelete.md b/modules/concepts/hooks/list-of-hooks/actionCategoryDelete.md index d9aa6e1dce..aa7beb797c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCategoryDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionCategoryDelete.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Category deletion' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Category.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Category.php' file: classes/Category.php locations: - 'front office' type: action -hookAliases: - - categoryDeletion +hookAliases: actionCategoryDelete array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is displayed when a category is deleted' ## Call of the Hook in the origin file ```php -Hook::exec('actionCategoryDelete', ['category' => $this, 'deleted_children' => $deletedChildren]) +Hook::exec('actionCategoryDelete', ['category' => $this, 'deleted_children' => $deletedChildren]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCategoryUpdate.md b/modules/concepts/hooks/list-of-hooks/actionCategoryUpdate.md index 2e4fdac8ec..ade173ad07 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCategoryUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionCategoryUpdate.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Category modification' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/Category.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Category.php' file: classes/Category.php locations: - 'back office' type: action -hookAliases: - - categoryUpdate +hookAliases: actionCategoryUpdate array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is displayed when a category is modified' ## Call of the Hook in the origin file ```php -Hook::exec('actionCategoryUpdate', ['category' => $category]) +Hook::exec('actionCategoryUpdate', ['category' => new Category($movedCategory['id_category'])]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCheckoutRender.md b/modules/concepts/hooks/list-of-hooks/actionCheckoutRender.md index 90aa3d1932..b818ac349f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCheckoutRender.md +++ b/modules/concepts/hooks/list-of-hooks/actionCheckoutRender.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Modify checkout process' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/OrderController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/OrderController.php' file: controllers/front/OrderController.php locations: - 'front office' @@ -23,5 +23,5 @@ description: 'This hook is called when constructing the checkout process' ## Call of the Hook in the origin file ```php -Hook::exec('actionCheckoutRender', ['checkoutProcess' => &$this->checkoutProcess]) +Hook::exec('actionCheckoutRender', ['checkoutProcess' => &$this->checkoutProcess]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionClearCache.md b/modules/concepts/hooks/list-of-hooks/actionClearCache.md index 943dbfb4da..4aed367734 100644 --- a/modules/concepts/hooks/list-of-hooks/actionClearCache.md +++ b/modules/concepts/hooks/list-of-hooks/actionClearCache.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Clear smarty cache' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Tools.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' file: classes/Tools.php locations: - 'front office' @@ -14,7 +14,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: "This hook is called when smarty's cache is cleared" +description: 'This hook is called when smarty''s cache is cleared' --- @@ -23,5 +23,5 @@ description: "This hook is called when smarty's cache is cleared" ## Call of the Hook in the origin file ```php -Hook::exec('actionClearCache') +Hook::exec('actionClearCache'); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionClearCompileCache.md b/modules/concepts/hooks/list-of-hooks/actionClearCompileCache.md index 9c02c9d890..8d7e158887 100644 --- a/modules/concepts/hooks/list-of-hooks/actionClearCompileCache.md +++ b/modules/concepts/hooks/list-of-hooks/actionClearCompileCache.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Clear smarty compile cache' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Tools.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' file: classes/Tools.php locations: - 'front office' @@ -14,7 +14,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: "This hook is called when smarty's compile cache is cleared" +description: 'This hook is called when smarty''s compile cache is cleared' --- @@ -23,5 +23,5 @@ description: "This hook is called when smarty's compile cache is cleared" ## Call of the Hook in the origin file ```php -Hook::exec('actionClearCompileCache') +Hook::exec('actionClearCompileCache'); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionClearSf2Cache.md b/modules/concepts/hooks/list-of-hooks/actionClearSf2Cache.md index 57c5a97901..21f1a91ee2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionClearSf2Cache.md +++ b/modules/concepts/hooks/list-of-hooks/actionClearSf2Cache.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Clear Sf2 cache' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Cache/Clearer/SymfonyCacheClearer.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Cache/Clearer/SymfonyCacheClearer.php' file: src/Adapter/Cache/Clearer/SymfonyCacheClearer.php locations: - 'front office' @@ -23,5 +23,5 @@ description: 'This hook is called when the Symfony cache is cleared' ## Call of the Hook in the origin file ```php -Hook::exec('actionClearSf2Cache') +Hook::exec('actionClearSf2Cache'); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionControllerInitAfter.md b/modules/concepts/hooks/list-of-hooks/actionControllerInitAfter.md index 8de5f68d6b..0d9a72a35b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionControllerInitAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionControllerInitAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Perform actions after controller initialization' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/Controller.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/Controller.php' file: classes/controller/Controller.php locations: - 'front office' @@ -28,5 +28,5 @@ Hook::exec( [ 'controller' => $this, ] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionControllerInitBefore.md b/modules/concepts/hooks/list-of-hooks/actionControllerInitBefore.md index 2c4400fa8d..b3b4ced02f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionControllerInitBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionControllerInitBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Perform actions before controller initialization' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/Controller.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/Controller.php' file: classes/controller/Controller.php locations: - 'front office' @@ -28,5 +28,5 @@ Hook::exec( [ 'controller' => $this, ] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCustomerAccountAdd.md b/modules/concepts/hooks/list-of-hooks/actionCustomerAccountAdd.md index ec75e8557b..70eb62283b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerAccountAdd.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerAccountAdd.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Successful customer account creation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerPersister.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerPersister.php' file: classes/form/CustomerPersister.php locations: - 'front office' type: action -hookAliases: - - createAccount +hookAliases: actionCustomerAccountAdd array_return: false check_exceptions: false chain: false @@ -35,5 +34,5 @@ description: 'This hook is called when a new customer creates an account success ```php Hook::exec('actionCustomerAccountAdd', [ 'newCustomer' => $customer, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCustomerAccountUpdate.md b/modules/concepts/hooks/list-of-hooks/actionCustomerAccountUpdate.md index f854ab7dac..db0482d45c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerAccountUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerAccountUpdate.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Successful customer account update' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerPersister.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerPersister.php' file: classes/form/CustomerPersister.php locations: - 'front office' @@ -25,5 +25,5 @@ description: 'This hook is called when a customer updates its account successful ```php Hook::exec('actionCustomerAccountUpdate', [ 'customer' => $customer, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCustomerAddGroups.md b/modules/concepts/hooks/list-of-hooks/actionCustomerAddGroups.md index e3a25c8e47..69b6376a95 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerAddGroups.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerAddGroups.md @@ -1,10 +1,10 @@ --- Title: actionCustomerAddGroups hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Customer.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Customer.php' file: classes/Customer.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionCustomerAddGroups', ['id_customer' => $this->id, 'groups' => $groups]) +Hook::exec('actionCustomerAddGroups', ['id_customer' => $this->id, 'groups' => $groups]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCustomerBeforeUpdateGroup.md b/modules/concepts/hooks/list-of-hooks/actionCustomerBeforeUpdateGroup.md index 384bb4f0a2..95972cbf07 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerBeforeUpdateGroup.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerBeforeUpdateGroup.md @@ -1,10 +1,10 @@ --- Title: actionCustomerBeforeUpdateGroup hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Customer.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Customer.php' file: classes/Customer.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionCustomerBeforeUpdateGroup', ['id_customer' => $this->id, 'groups' => $list]) +Hook::exec('actionCustomerBeforeUpdateGroup', ['id_customer' => $this->id, 'groups' => $list]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutAfter.md b/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutAfter.md index 4c3a56a299..84163217fe 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'After customer logout' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Customer.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Customer.php' file: classes/Customer.php locations: - 'front office' @@ -23,5 +23,5 @@ description: 'This hook allows you to execute code after customer logout' ## Call of the Hook in the origin file ```php -Hook::exec('actionCustomerLogoutAfter', ['customer' => $this]) +Hook::exec('actionCustomerLogoutAfter', ['customer' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutBefore.md b/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutBefore.md index d5b224bd79..e03c56b0f1 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Before customer logout' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Customer.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Customer.php' file: classes/Customer.php locations: - 'front office' @@ -23,5 +23,5 @@ description: 'This hook allows you to execute code before customer logout' ## Call of the Hook in the origin file ```php -Hook::exec('actionCustomerLogoutBefore', ['customer' => $this]) +Hook::exec('actionCustomerLogoutBefore', ['customer' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionDeleteGDPRCustomer.md b/modules/concepts/hooks/list-of-hooks/actionDeleteGDPRCustomer.md index 7e823f3f73..6bbd949854 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDeleteGDPRCustomer.md +++ b/modules/concepts/hooks/list-of-hooks/actionDeleteGDPRCustomer.md @@ -1,7 +1,7 @@ --- Title: actionDeleteGDPRCustomer hidden: true -hookTitle: +hookTitle: '' files: - module: psgdpr @@ -24,5 +24,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionDeleteGDPRCustomer', $customer, $module['id_module']) +Hook::exec('actionDeleteGDPRCustomer', $customer, $module['id_module']); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByPrice.md b/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByPrice.md index b09c9d467e..1b2379a755 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByPrice.md +++ b/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByPrice.md @@ -1,10 +1,10 @@ --- Title: actionDeliveryPriceByPrice hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Carrier.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Carrier.php' file: classes/Carrier.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionDeliveryPriceByPrice', ['id_carrier' => $id_carrier, 'order_total' => $order_total, 'id_zone' => $id_zone]) +Hook::exec('actionDeliveryPriceByPrice', ['id_carrier' => $id_carrier, 'order_total' => $order_total, 'id_zone' => $id_zone]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByWeight.md b/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByWeight.md index 30de008e6a..f588cd8e58 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByWeight.md +++ b/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByWeight.md @@ -1,10 +1,10 @@ --- Title: actionDeliveryPriceByWeight hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Carrier.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Carrier.php' file: classes/Carrier.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionDeliveryPriceByWeight', ['id_carrier' => $id_carrier, 'total_weight' => $total_weight, 'id_zone' => $id_zone]) +Hook::exec('actionDeliveryPriceByWeight', ['id_carrier' => $id_carrier, 'total_weight' => $total_weight, 'id_zone' => $id_zone]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionDispatcher.md b/modules/concepts/hooks/list-of-hooks/actionDispatcher.md index 0ce710f34b..a61a0c624b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDispatcher.md +++ b/modules/concepts/hooks/list-of-hooks/actionDispatcher.md @@ -1,10 +1,10 @@ --- Title: actionDispatcher hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Dispatcher.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Dispatcher.php' file: classes/Dispatcher.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionDispatcher', $params_hook_action_dispatcher) +Hook::exec('actionDispatcher', $params_hook_action_dispatcher); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionDispatcherAfter.md b/modules/concepts/hooks/list-of-hooks/actionDispatcherAfter.md index 3a82141114..0cda31b662 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDispatcherAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionDispatcherAfter.md @@ -4,8 +4,8 @@ hidden: true hookTitle: 'After dispatch' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/EventListener/ActionDispatcherLegacyHooksSubscriber.php' - file: src/PrestaShopBundle/EventListener/ActionDispatcherLegacyHooksSubscriber.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Dispatcher.php' + file: classes/Dispatcher.php locations: - 'front office' type: action @@ -23,9 +23,5 @@ description: 'This hook is called at the end of the dispatch method of the Dispa ## Call of the Hook in the origin file ```php -dispatchWithParameters(self::DISPATCHER_AFTER_ACTION, [ - 'controller_type' => $requestAttributes->get('controller_type'), - 'controller_class' => $requestAttributes->get('controller_name'), - 'is_module' => 0, - ]) +Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionDispatcherBefore.md b/modules/concepts/hooks/list-of-hooks/actionDispatcherBefore.md index 2d00e5edf4..b6001dd5d7 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDispatcherBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionDispatcherBefore.md @@ -4,8 +4,8 @@ hidden: true hookTitle: 'Before dispatch' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/EventListener/ActionDispatcherLegacyHooksSubscriber.php' - file: src/PrestaShopBundle/EventListener/ActionDispatcherLegacyHooksSubscriber.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Routing/LegacyRouterChecker.php' + file: src/PrestaShopBundle/Routing/LegacyRouterChecker.php locations: - 'front office' type: action @@ -23,7 +23,5 @@ description: 'This hook is called at the beginning of the dispatch method of the ## Call of the Hook in the origin file ```php -dispatchWithParameters(self::DISPATCHER_BEFORE_ACTION, [ - 'controller_type' => $controllerType, - ]) +$this->hookDispatcher->dispatchWithParameters('actionDispatcherBefore', ['controller_type' => Dispatcher::FC_ADMIN]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md b/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md index 8542130dcd..1e139261a2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md +++ b/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md @@ -1,10 +1,10 @@ --- Title: actionDownloadAttachment hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/AttachmentController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/AttachmentController.php' file: controllers/front/AttachmentController.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionDownloadAttachment', ['attachment' => &$attachment]) +Hook::exec('actionDownloadAttachment', ['attachment' => &$attachment]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionEmailAddAfterContent.md b/modules/concepts/hooks/list-of-hooks/actionEmailAddAfterContent.md index 81daaede16..a240552e8e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionEmailAddAfterContent.md +++ b/modules/concepts/hooks/list-of-hooks/actionEmailAddAfterContent.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Add extra content after mail content' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Mail.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Mail.php' file: classes/Mail.php locations: - 'front office' @@ -33,5 +33,5 @@ Hook::exec( ], null, true - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionEmailAddBeforeContent.md b/modules/concepts/hooks/list-of-hooks/actionEmailAddBeforeContent.md index 2f2cbc7dbe..dfd8d0c54d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionEmailAddBeforeContent.md +++ b/modules/concepts/hooks/list-of-hooks/actionEmailAddBeforeContent.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Add extra content before mail content' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Mail.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Mail.php' file: classes/Mail.php locations: - 'front office' @@ -33,5 +33,5 @@ Hook::exec( ], null, true - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionEmailSendBefore.md b/modules/concepts/hooks/list-of-hooks/actionEmailSendBefore.md index e69a0d8f81..bd73c2c475 100644 --- a/modules/concepts/hooks/list-of-hooks/actionEmailSendBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionEmailSendBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Before sending an email' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Mail.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Mail.php' file: classes/Mail.php locations: - 'front office' @@ -45,5 +45,5 @@ Hook::exec( ], null, true - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md b/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md index 94978549dd..2c1fb51896 100644 --- a/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md +++ b/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md @@ -1,10 +1,10 @@ --- Title: actionExportGDPRData hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/modules/psgdpr/psgdpr.php' + url: 'https://github.com/PrestaShop/psgdpr/blob/master/psgdpr.php' file: modules/psgdpr/psgdpr.php locations: - 'front office' @@ -24,5 +24,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionExportGDPRData', $customer, $module['id_module']) +Hook::exec('actionExportGDPRData', (array) $customer, $module['id_module']) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFeatureDelete.md b/modules/concepts/hooks/list-of-hooks/actionFeatureDelete.md index 3cf6c00b94..f8b8034572 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFeatureDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionFeatureDelete.md @@ -1,16 +1,15 @@ --- Title: actionFeatureDelete hidden: true -hookTitle: "Deleting attributes' features" +hookTitle: 'Deleting attributes'' features' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Feature.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Feature.php' file: classes/Feature.php locations: - 'front office' type: action -hookAliases: - - afterDeleteFeature +hookAliases: actionFeatureDelete array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is called while deleting an attributes features' ## Call of the Hook in the origin file ```php -Hook::exec('actionFeatureDelete', ['id_feature' => $this->id]) +Hook::exec('actionFeatureDelete', ['id_feature' => $this->id]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFeatureSave.md b/modules/concepts/hooks/list-of-hooks/actionFeatureSave.md index 18d0fb7829..f7afe9fec9 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFeatureSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionFeatureSave.md @@ -1,16 +1,15 @@ --- Title: actionFeatureSave hidden: true -hookTitle: "Saving attributes' features" +hookTitle: 'Saving attributes'' features' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Feature.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Feature.php' file: classes/Feature.php locations: - 'front office' type: action -hookAliases: - - afterSaveFeature +hookAliases: actionFeatureSave array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is called while saving an attributes features' ## Call of the Hook in the origin file ```php -Hook::exec('actionFeatureSave', ['id_feature' => $this->id]) +Hook::exec('actionFeatureSave', ['id_feature' => $this->id]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFeatureValueDelete.md b/modules/concepts/hooks/list-of-hooks/actionFeatureValueDelete.md index 21997d7aac..6385fdca68 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFeatureValueDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionFeatureValueDelete.md @@ -1,16 +1,15 @@ --- Title: actionFeatureValueDelete hidden: true -hookTitle: "Deleting attributes' features' values" +hookTitle: 'Deleting attributes'' features'' values' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/FeatureValue.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/FeatureValue.php' file: classes/FeatureValue.php locations: - 'front office' type: action -hookAliases: - - afterDeleteFeatureValue +hookAliases: actionFeatureValueDelete array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is called while deleting an attributes features value' ## Call of the Hook in the origin file ```php -Hook::exec('actionFeatureValueDelete', ['id_feature_value' => $this->id]) +Hook::exec('actionFeatureValueDelete', ['id_feature_value' => $this->id]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFeatureValueSave.md b/modules/concepts/hooks/list-of-hooks/actionFeatureValueSave.md index c1b7a2dc15..9b9a1abaaf 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFeatureValueSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionFeatureValueSave.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Saving an attributes features value' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/FeatureValue.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/FeatureValue.php' file: classes/FeatureValue.php locations: - 'front office' type: action -hookAliases: - - afterSaveFeatureValue +hookAliases: actionFeatureValueSave array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is called while saving an attributes features value' ## Call of the Hook in the origin file ```php -Hook::exec('actionFeatureValueSave', ['id_feature_value' => $this->id]) +Hook::exec('actionFeatureValueSave', ['id_feature_value' => $this->id]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFilterDeliveryOptionList.md b/modules/concepts/hooks/list-of-hooks/actionFilterDeliveryOptionList.md index 56e3035c47..46ac036c5a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFilterDeliveryOptionList.md +++ b/modules/concepts/hooks/list-of-hooks/actionFilterDeliveryOptionList.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Modify delivery option list result' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Cart.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' file: classes/Cart.php locations: - 'front office' @@ -34,11 +34,12 @@ description: 'This hook allows you to modify delivery option list' ```php Hook::exec( - 'actionFilterDeliveryOptionList', - [ - 'delivery_option_list' => &$delivery_option_list, - ] -) + 'actionFilterDeliveryOptionList', + [ + 'delivery_option_list' => &$delivery_option_list, + 'cart' => $this, + ] + ); ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerDetectContextCountryAfter.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerDetectContextCountryAfter.md index 9aa7655703..ffe02fa19f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerDetectContextCountryAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerDetectContextCountryAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Action after detecting context country' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitAfter.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitAfter.md index bd4f566525..c7900ee1c4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitAfter.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Perform actions after front office controller initialization' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' type: action -hookAliases: - - actionFrontControllerAfterInit +hookAliases: actionFrontControllerInitAfter array_return: false check_exceptions: false chain: false @@ -29,5 +28,5 @@ Hook::exec( [ 'controller' => $this, ] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitBefore.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitBefore.md index 362b9e52c7..902e64519b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Perform actions before front office controller initialization' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -28,5 +28,5 @@ Hook::exec( [ 'controller' => $this, ] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitContextCurrencyAfter.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitContextCurrencyAfter.md index c56fe6f124..a4315761fc 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitContextCurrencyAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitContextCurrencyAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Action after initializing context currency' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md index 3a7bf3a065..d00b269267 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md @@ -1,10 +1,10 @@ --- Title: actionFrontControllerSetMedia hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionFrontControllerSetMedia', []) +Hook::exec('actionFrontControllerSetMedia'); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariables.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariables.md index b67a329c95..c96b43dfb8 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariables.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariables.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Add variables in JavaScript object and Smarty templates' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -47,5 +47,5 @@ Hook::exec( ], null, true - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariablesBefore.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariablesBefore.md index 1d6f2cb7a7..a49e3d2948 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariablesBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariablesBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Add general purpose variables in JavaScript object and Smarty templates before assignation.' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionGenerateDocumentReference.md b/modules/concepts/hooks/list-of-hooks/actionGenerateDocumentReference.md index d266ad18cc..bdce4bfae0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGenerateDocumentReference.md +++ b/modules/concepts/hooks/list-of-hooks/actionGenerateDocumentReference.md @@ -1,10 +1,10 @@ --- Title: actionGenerateDocumentReference hidden: true -hookTitle: 'Modify document reference for Order' +hookTitle: 'Modify document reference' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.1.x/classes/order/Order.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/Order.php' file: classes/order/Order.php locations: - 'front office' @@ -14,7 +14,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: 'This hook allows modules to return custom document references for order' +description: 'This hook allows modules to return custom document references' --- @@ -23,7 +23,7 @@ description: 'This hook allows modules to return custom document references for ## Call of the Hook in the origin file ```php -$reference = Hook::exec('actionGenerateDocumentReference', [ - 'type' => 'order', -]); +Hook::exec('actionGenerateDocumentReference', [ + 'type' => 'order', + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetAdminOrderButtons.md b/modules/concepts/hooks/list-of-hooks/actionGetAdminOrderButtons.md index c694482fb1..89be4a5a63 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetAdminOrderButtons.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetAdminOrderButtons.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Admin Order Buttons' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Controller/Admin/Sell/Order/OrderController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/Sell/Order/OrderController.php' file: src/PrestaShopBundle/Controller/Admin/Sell/Order/OrderController.php locations: - 'back office' @@ -35,12 +35,12 @@ description: 'This hook is used to generate the buttons collection on the order ## Call of the Hook in the origin file ```php -dispatchHook( +dispatchHookWithParameters( 'actionGetAdminOrderButtons', [ 'controller' => $this, 'id_order' => $orderId, - 'actions_bar_buttons_collection' => $back officeOrderButtons, + 'actions_bar_buttons_collection' => $backOfficeOrderButtons, ] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetAdminToolbarButtons.md b/modules/concepts/hooks/list-of-hooks/actionGetAdminToolbarButtons.md index 8c3704e055..25cc59cce3 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetAdminToolbarButtons.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetAdminToolbarButtons.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Allows to add buttons in any toolbar in the back office' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' @@ -36,5 +36,5 @@ description: 'This hook allows you to define descriptions of buttons to add in a Hook::exec('actionGetAdminToolbarButtons', [ 'controller' => $this, 'toolbar_extra_buttons_collection' => &$toolbarButtonsCollection, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetAlternativeSearchPanels.md b/modules/concepts/hooks/list-of-hooks/actionGetAlternativeSearchPanels.md index b80dd89765..d4006f86b5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetAlternativeSearchPanels.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetAlternativeSearchPanels.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Additional search panel' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminSearchController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminSearchController.php' file: controllers/admin/AdminSearchController.php locations: - 'back office' @@ -41,5 +41,5 @@ Hook::exec( ], null, true - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md b/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md index 813d945b83..c94b494c11 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md @@ -1,10 +1,10 @@ --- Title: actionGetExtraMailTemplateVars hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Mail.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Mail.php' file: classes/Mail.php locations: - 'front office' @@ -33,5 +33,5 @@ Hook::exec( ], null, true - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md b/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md index 30bf3a0256..b77b55d53b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md @@ -1,10 +1,10 @@ --- Title: actionGetIDZoneByAddressID hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Address.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Address.php' file: classes/Address.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionGetIDZoneByAddressID', ['id_address' => $id_address]) +Hook::exec('actionGetIDZoneByAddressID', ['id_address' => $id_address]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfter.md b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfter.md index 0b1203af71..7d9077574b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfter.md @@ -1,10 +1,10 @@ --- Title: actionGetProductPropertiesAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' @@ -27,5 +27,5 @@ Hook::exec('actionGetProductPropertiesAfter', [ 'id_lang' => $id_lang, 'product' => &$row, 'context' => $context, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfterUnitPrice.md b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfterUnitPrice.md index 1657dd9c4f..e675851b08 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfterUnitPrice.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfterUnitPrice.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Product Properties' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' @@ -27,5 +27,5 @@ Hook::exec('actionGetProductPropertiesAfterUnitPrice', [ 'id_lang' => $id_lang, 'product' => &$row, 'context' => $context, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesBefore.md b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesBefore.md index e9c4d68d5c..0ee1f0c8a9 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesBefore.md @@ -1,10 +1,10 @@ --- Title: actionGetProductPropertiesBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' @@ -27,5 +27,5 @@ Hook::exec('actionGetProductPropertiesBefore', [ 'id_lang' => $id_lang, 'product' => &$row, 'context' => $context, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionHtaccessCreate.md b/modules/concepts/hooks/list-of-hooks/actionHtaccessCreate.md index 249983da4b..517d0b316f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionHtaccessCreate.md +++ b/modules/concepts/hooks/list-of-hooks/actionHtaccessCreate.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'After htaccess creation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/Tools.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' file: classes/Tools.php locations: - 'front office' type: action -hookAliases: - - afterCreateHtaccess +hookAliases: actionHtaccessCreate array_return: false check_exceptions: false chain: false diff --git a/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md b/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md index 6516525a36..8c1956eff2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md +++ b/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md @@ -1,10 +1,10 @@ --- Title: actionInvoiceNumberFormatted hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/order/OrderInvoice.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderInvoice.php' file: classes/order/OrderInvoice.php locations: - 'front office' @@ -28,5 +28,5 @@ Hook::exec('actionInvoiceNumberFormatted', [ 'id_lang' => (int) $id_lang, 'id_shop' => (int) $id_shop, 'number' => (int) $this->number, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionLanguageLinkParameters.md b/modules/concepts/hooks/list-of-hooks/actionLanguageLinkParameters.md index f12b89a0dd..71d312d0b8 100644 --- a/modules/concepts/hooks/list-of-hooks/actionLanguageLinkParameters.md +++ b/modules/concepts/hooks/list-of-hooks/actionLanguageLinkParameters.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Add parameters to language link' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/Link.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Link.php' file: classes/Link.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionLoggerLogMessage.md b/modules/concepts/hooks/list-of-hooks/actionLoggerLogMessage.md index 66862d865e..e9d509e08f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionLoggerLogMessage.md +++ b/modules/concepts/hooks/list-of-hooks/actionLoggerLogMessage.md @@ -2,7 +2,10 @@ Title: actionLoggerLogMessage hidden: true hookTitle: 'Allows to make extra action while a log is triggered' -files: { } +files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/log/AbstractLogger.php' + file: classes/log/AbstractLogger.php locations: - 'back office' - 'front office' @@ -12,7 +15,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: '' +description: 'This hook allows to make an extra action while an exception is thrown and the logger logs it' --- @@ -22,12 +25,11 @@ description: '' ```php Hook::exec( - 'actionLoggerLogMessage', - [ - 'message' => $message, - 'level' => $level, - 'isLogged' => $level >= $this->level, - ] -); + 'actionLoggerLogMessage', + [ + 'message' => $message, + 'level' => $level, + 'isLogged' => $level >= $this->level, + ] + ); ``` - diff --git a/modules/concepts/hooks/list-of-hooks/actionMailAlterMessageBeforeSend.md b/modules/concepts/hooks/list-of-hooks/actionMailAlterMessageBeforeSend.md index 5b6dfb5483..0af4751132 100644 --- a/modules/concepts/hooks/list-of-hooks/actionMailAlterMessageBeforeSend.md +++ b/modules/concepts/hooks/list-of-hooks/actionMailAlterMessageBeforeSend.md @@ -1,10 +1,10 @@ --- Title: actionMailAlterMessageBeforeSend hidden: true -hookTitle: +hookTitle: 'Modify Swift Message before sending' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Mail.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Mail.php' file: classes/Mail.php locations: - 'front office' @@ -14,7 +14,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: '' +description: 'This hook is called before the Swift Message is sent in Mail.php' --- @@ -24,6 +24,6 @@ description: '' ```php Hook::exec('actionMailAlterMessageBeforeSend', [ - 'message' => &$message, - ]) + 'message' => &$email, + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionModifyFrontendSitemap.md b/modules/concepts/hooks/list-of-hooks/actionModifyFrontendSitemap.md index 4793c9b3ef..f80fb7b48b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModifyFrontendSitemap.md +++ b/modules/concepts/hooks/list-of-hooks/actionModifyFrontendSitemap.md @@ -1,10 +1,10 @@ --- Title: actionModifyFrontendSitemap hidden: true -hookTitle: 'Allows modules to add own urls (even whole new groups) to frontend sitemap.' +hookTitle: 'Add or remove links on sitemap page' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.1.x/controllers/front/SitemapController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/SitemapController.php' file: controllers/front/SitemapController.php locations: - 'front office' @@ -15,7 +15,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: 'For example landing pages, blog posts and others.' +description: 'This hook allows to modify links on sitemap page of your shop. Useful to improve indexation of your modules.' --- @@ -52,5 +52,4 @@ public function hookActionModifyFrontendSitemap($params) $params['urls']['pages']['links'] = array_merge($params['urls']['pages']['links'], $customUrls); // add custom urls to pages group unset($params['urls']['categories']); // hide categories } -``` - +``` \ No newline at end of file diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleInstallAfter.md b/modules/concepts/hooks/list-of-hooks/actionModuleInstallAfter.md index 2bcb6b131c..1720f8cab9 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleInstallAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleInstallAfter.md @@ -1,10 +1,10 @@ --- Title: actionModuleInstallAfter hidden: true -hookTitle: actionModuleInstallAfter +hookTitle: 'actionModuleInstallAfter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/module/Module.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/module/Module.php' file: classes/module/Module.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionModuleInstallAfter', ['object' => $this]) +Hook::exec('actionModuleInstallAfter', ['object' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleInstallBefore.md b/modules/concepts/hooks/list-of-hooks/actionModuleInstallBefore.md index 005d9ea685..7b180ea847 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleInstallBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleInstallBefore.md @@ -1,10 +1,10 @@ --- Title: actionModuleInstallBefore hidden: true -hookTitle: actionModuleInstallBefore +hookTitle: 'actionModuleInstallBefore' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/module/Module.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/module/Module.php' file: classes/module/Module.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionModuleInstallBefore', ['object' => $this]) +Hook::exec('actionModuleInstallBefore', ['object' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleMailAlertSendCustomer.md b/modules/concepts/hooks/list-of-hooks/actionModuleMailAlertSendCustomer.md index 336e9dfd57..53b3097d3e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleMailAlertSendCustomer.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleMailAlertSendCustomer.md @@ -1,7 +1,7 @@ --- Title: actionModuleMailAlertSendCustomer hidden: true -hookTitle: +hookTitle: '' files: - module: ps_emailalerts @@ -25,12 +25,12 @@ description: '' ```php Hook::exec( - 'actionModuleMailAlertSendCustomer', - [ - 'product' => $product_name, - 'link' => $product_link, - 'customer' => $customer, - 'product_obj' => $product, - ] -) + 'actionModuleMailAlertSendCustomer', + [ + 'product' => $product_name, + 'link' => $product_link, + 'customer' => $customer, + 'product_obj' => $product, + ] + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookAfter.md b/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookAfter.md index 2f8587e673..0d482b9207 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookAfter.md @@ -1,10 +1,10 @@ --- Title: actionModuleRegisterHookAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Hook.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' file: classes/Hook.php locations: - 'front office' @@ -23,11 +23,8 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionModuleRegisterHookAfter', - [ - 'object' => $module_instance, - 'hook_name' => $hook_name, - ] - ) +Hook::exec('actionModuleRegisterHookAfter', [ + 'object' => $module_instance, + 'hook_name' => $hook_name, + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookBefore.md b/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookBefore.md index db460c35dc..c5cc85e9df 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookBefore.md @@ -1,10 +1,10 @@ --- Title: actionModuleRegisterHookBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Hook.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' file: classes/Hook.php locations: - 'front office' @@ -23,11 +23,8 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionModuleRegisterHookBefore', - [ - 'object' => $module_instance, - 'hook_name' => $hook_name, - ] - ) +Hook::exec('actionModuleRegisterHookBefore', [ + 'object' => $module_instance, + 'hook_name' => $hook_name, + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookAfter.md b/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookAfter.md index d72ed21c86..e05c501712 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookAfter.md @@ -1,10 +1,10 @@ --- Title: actionModuleUnRegisterHookAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Hook.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' file: classes/Hook.php locations: - 'front office' @@ -23,11 +23,8 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionModuleUnRegisterHookAfter', - [ +Hook::exec('actionModuleUnRegisterHookAfter', [ 'object' => $module_instance, 'hook_name' => $hook_name, - ] - ) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookBefore.md b/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookBefore.md index 5df349eede..d9770c015d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookBefore.md @@ -1,10 +1,10 @@ --- Title: actionModuleUnRegisterHookBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Hook.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' file: classes/Hook.php locations: - 'front office' @@ -23,5 +23,8 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionModuleUnRegisterHookBefore', ['object' => $module_instance, 'hook_name' => $hook_name]) +Hook::exec('actionModuleUnRegisterHookBefore', [ + 'object' => $module_instance, + 'hook_name' => $hook_name, + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleUninstallAfter.md b/modules/concepts/hooks/list-of-hooks/actionModuleUninstallAfter.md index 18773e5e97..434db56707 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleUninstallAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleUninstallAfter.md @@ -1,10 +1,10 @@ --- Title: actionModuleUninstallAfter hidden: true -hookTitle: actionModuleUninstallAfter +hookTitle: 'actionModuleUninstallAfter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/module/Module.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/module/Module.php' file: classes/module/Module.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionModuleUninstallAfter', ['object' => $this]) +Hook::exec('actionModuleUninstallAfter', ['object' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleUninstallBefore.md b/modules/concepts/hooks/list-of-hooks/actionModuleUninstallBefore.md index 3c3b23bfe6..4954f87c76 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleUninstallBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleUninstallBefore.md @@ -1,10 +1,10 @@ --- Title: actionModuleUninstallBefore hidden: true -hookTitle: actionModuleUninstallBefore +hookTitle: 'actionModuleUninstallBefore' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/module/Module.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/module/Module.php' file: classes/module/Module.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionModuleUninstallBefore', ['object' => $this]) +Hook::exec('actionModuleUninstallBefore', ['object' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationAfter.md b/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationAfter.md index 080873e066..d0447f5099 100644 --- a/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationAfter.md @@ -1,7 +1,7 @@ --- Title: actionNewsletterRegistrationAfter hidden: true -hookTitle: +hookTitle: '' files: - module: ps_emailsubscription diff --git a/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationBefore.md b/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationBefore.md index d2c62ef263..36097ad77b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationBefore.md @@ -1,7 +1,7 @@ --- Title: actionNewsletterRegistrationBefore hidden: true -hookTitle: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/ps_emailsubscription/blob/master/ps_emailsubscription.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectAddAfter.md b/modules/concepts/hooks/list-of-hooks/actionObjectAddAfter.md index e1ae78bac5..436eb00589 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectAddAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectAddAfter.md @@ -1,10 +1,10 @@ --- Title: actionObjectAddAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ObjectModel.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' file: classes/ObjectModel.php locations: - 'back office' @@ -24,5 +24,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionObjectAddAfter', ['object' => $this]) +Hook::exec('actionObjectAddAfter', ['object' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectAddBefore.md b/modules/concepts/hooks/list-of-hooks/actionObjectAddBefore.md index 5b0c122c4c..3c1bc162d4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectAddBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectAddBefore.md @@ -1,10 +1,10 @@ --- Title: actionObjectAddBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ObjectModel.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' file: classes/ObjectModel.php locations: - 'back office' @@ -24,5 +24,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionObjectAddBefore', ['object' => $this]) +Hook::exec('actionObjectAddBefore', ['object' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectDeleteAfter.md b/modules/concepts/hooks/list-of-hooks/actionObjectDeleteAfter.md index 7b97a94e3e..b884dc4b97 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectDeleteAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectDeleteAfter.md @@ -1,10 +1,10 @@ --- Title: actionObjectDeleteAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ObjectModel.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' file: classes/ObjectModel.php locations: - 'back office' @@ -24,5 +24,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionObjectDeleteAfter', ['object' => $this]) +Hook::exec('actionObjectDeleteAfter', ['object' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectDeleteBefore.md b/modules/concepts/hooks/list-of-hooks/actionObjectDeleteBefore.md index bc371abf5b..d194367daf 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectDeleteBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectDeleteBefore.md @@ -1,10 +1,10 @@ --- Title: actionObjectDeleteBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ObjectModel.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' file: classes/ObjectModel.php locations: - 'back office' @@ -24,5 +24,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionObjectDeleteBefore', ['object' => $this]) +Hook::exec('actionObjectDeleteBefore', ['object' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectProductCommentValidateAfter.md b/modules/concepts/hooks/list-of-hooks/actionObjectProductCommentValidateAfter.md index 01fb789e29..f71b14feb6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectProductCommentValidateAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectProductCommentValidateAfter.md @@ -1,7 +1,7 @@ --- Title: actionObjectProductCommentValidateAfter hidden: true -hookTitle: +hookTitle: '' files: - module: productcomments diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteAfter.md b/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteAfter.md index 9f8471f1d4..75ff80a02f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Cart product removal' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/CartController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/CartController.php' file: controllers/front/CartController.php locations: - 'back office' @@ -24,5 +24,5 @@ description: 'This hook is called after a product is removed from a cart' ## Call of the Hook in the origin file ```php -Hook::exec('actionObjectProductInCartDeleteAfter', $data) +Hook::exec('actionObjectProductInCartDeleteAfter', $data); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteBefore.md b/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteBefore.md index b5b3c5d86f..5ac58234e7 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Cart product removal' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/CartController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/CartController.php' file: controllers/front/CartController.php locations: - 'back office' @@ -24,5 +24,5 @@ description: 'This hook is called before a product is removed from a cart' ## Call of the Hook in the origin file ```php -Hook::exec('actionObjectProductInCartDeleteBefore', $data, null, true) +Hook::exec('actionObjectProductInCartDeleteBefore', $data, null, true); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectUpdateAfter.md b/modules/concepts/hooks/list-of-hooks/actionObjectUpdateAfter.md index b1dff5faa3..d99204fda0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectUpdateAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectUpdateAfter.md @@ -1,10 +1,10 @@ --- Title: actionObjectUpdateAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ObjectModel.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' file: classes/ObjectModel.php locations: - 'back office' @@ -24,5 +24,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionObjectUpdateAfter', ['object' => $this]) +Hook::exec('actionObjectUpdateAfter', ['object' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectUpdateBefore.md b/modules/concepts/hooks/list-of-hooks/actionObjectUpdateBefore.md index 9d915c0b94..6f2532de5e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectUpdateBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectUpdateBefore.md @@ -1,10 +1,10 @@ --- Title: actionObjectUpdateBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ObjectModel.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' file: classes/ObjectModel.php locations: - 'back office' @@ -24,5 +24,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionObjectUpdateBefore', ['object' => $this]) +Hook::exec('actionObjectUpdateBefore', ['object' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOnImageCutAfter.md b/modules/concepts/hooks/list-of-hooks/actionOnImageCutAfter.md index 72a746a002..85f5da7a78 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOnImageCutAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionOnImageCutAfter.md @@ -1,10 +1,10 @@ --- Title: actionOnImageCutAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ImageManager.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ImageManager.php' file: classes/ImageManager.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionOnImageCutAfter', ['dst_file' => $dstFile, 'file_type' => $fileType]) +Hook::exec('actionOnImageCutAfter', ['dst_file' => $dstFile, 'file_type' => $fileType]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOnImageResizeAfter.md b/modules/concepts/hooks/list-of-hooks/actionOnImageResizeAfter.md index 35d54300e9..7e2903986c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOnImageResizeAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionOnImageResizeAfter.md @@ -1,10 +1,10 @@ --- Title: actionOnImageResizeAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ImageManager.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ImageManager.php' file: classes/ImageManager.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionOnImageResizeAfter', ['dst_file' => $destinationFile, 'file_type' => $fileType]) +Hook::exec('actionOnImageResizeAfter', ['dst_file' => $destinationFile, 'file_type' => $destinationFileType]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOrderEdited.md b/modules/concepts/hooks/list-of-hooks/actionOrderEdited.md index e301d25d88..e9b3b046ea 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderEdited.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderEdited.md @@ -4,8 +4,8 @@ hidden: true hookTitle: 'Order edited' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Order/CommandHandler/UpdateProductInOrderHandler.php' - file: src/Adapter/Order/CommandHandler/UpdateProductInOrderHandler.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/DeleteProductFromOrderHandler.php' + file: src/Adapter/Order/CommandHandler/DeleteProductFromOrderHandler.php locations: - 'front office' type: action @@ -31,5 +31,5 @@ description: 'This hook is called when an order is edited' ## Call of the Hook in the origin file ```php -Hook::exec('actionOrderEdited', ['order' => $order]) +Hook::exec('actionOrderEdited', ['order' => $order]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOrderHistoryAddAfter.md b/modules/concepts/hooks/list-of-hooks/actionOrderHistoryAddAfter.md index a0067475a4..9b4fa120a1 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderHistoryAddAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderHistoryAddAfter.md @@ -1,17 +1,17 @@ --- Title: actionOrderHistoryAddAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/order/OrderHistory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderHistory.php' file: classes/order/OrderHistory.php locations: - 'front office' type: action hookAliases: array_return: false -check_exceptions: false +check_exceptions: true chain: false origin: core description: '' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionOrderHistoryAddAfter', ['order_history' => $this], null, false, true, false, $order->id_shop) +Hook::exec('actionOrderHistoryAddAfter', ['order_history' => $this], null, false, true, false, $order->id_shop); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOrderReturn.md b/modules/concepts/hooks/list-of-hooks/actionOrderReturn.md index 14019b0f24..1451166d82 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderReturn.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderReturn.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Returned product' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/OrderFollowController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/OrderFollowController.php' file: controllers/front/OrderFollowController.php locations: - 'front office' type: action -hookAliases: - - orderReturn +hookAliases: actionOrderReturn array_return: false check_exceptions: false chain: false @@ -33,5 +32,5 @@ description: 'This hook is displayed when a customer returns a product ' ## Call of the Hook in the origin file ```php -Hook::exec('actionOrderReturn', ['orderReturn' => $orderReturn]) +Hook::exec('actionOrderReturn', ['orderReturn' => $orderReturn]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOrderSlipAdd.md b/modules/concepts/hooks/list-of-hooks/actionOrderSlipAdd.md index 008bfb2c05..99df483a80 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderSlipAdd.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderSlipAdd.md @@ -4,15 +4,14 @@ hidden: true hookTitle: 'Order slip creation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Order/Refund/OrderSlipCreator.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/Refund/OrderSlipCreator.php' file: src/Adapter/Order/Refund/OrderSlipCreator.php locations: - 'front office' type: action -hookAliases: - - orderSlip +hookAliases: actionOrderSlipAdd array_return: false -check_exceptions: false +check_exceptions: true chain: false origin: core description: 'This hook is called when a new credit slip is added regarding client order' @@ -50,5 +49,6 @@ Hook::exec('actionOrderSlipAdd', [ 'order' => $order, 'productList' => $orderRefundSummary->getProductRefunds(), 'qtyList' => $fullQuantityList, - ], null, false, true, false, $order->id_shop) + 'orderSlipCreated' => $this->orderSlipCreated, + ], null, false, true, false, $order->id_shop); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOrderStatusPostUpdate.md b/modules/concepts/hooks/list-of-hooks/actionOrderStatusPostUpdate.md index 629438f6d6..f083992fec 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderStatusPostUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderStatusPostUpdate.md @@ -4,15 +4,14 @@ hidden: true hookTitle: 'Post update of order status' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/order/OrderHistory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderHistory.php' file: classes/order/OrderHistory.php locations: - 'front office' type: action -hookAliases: - - postUpdateOrderStatus +hookAliases: actionOrderStatusPostUpdate array_return: false -check_exceptions: false +check_exceptions: true chain: false origin: core description: 'Allows to be notified after order status is changed.' @@ -39,5 +38,5 @@ Hook::exec('actionOrderStatusPostUpdate', [ 'newOrderStatus' => $new_os, 'oldOrderStatus' => $old_os, 'id_order' => (int) $order->id, - ], null, false, true, false, $order->id_shop) + ], null, false, true, false, $order->id_shop); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOrderStatusUpdate.md b/modules/concepts/hooks/list-of-hooks/actionOrderStatusUpdate.md index 6dadf78a63..c559ed7488 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderStatusUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderStatusUpdate.md @@ -4,15 +4,14 @@ hidden: true hookTitle: 'Order status update - Event' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/order/OrderHistory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderHistory.php' file: classes/order/OrderHistory.php locations: - 'front office' type: action -hookAliases: - - updateOrderStatus +hookAliases: actionOrderStatusUpdate array_return: false -check_exceptions: false +check_exceptions: true chain: false origin: core description: 'This hook launches modules when the status of an order changes' @@ -39,5 +38,5 @@ Hook::exec('actionOrderStatusUpdate', [ 'newOrderStatus' => $new_os, 'oldOrderStatus' => $old_os, 'id_order' => (int) $order->id, - ], null, false, true, false, $order->id_shop) + ], null, false, true, false, $order->id_shop); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOutputHTMLBefore.md b/modules/concepts/hooks/list-of-hooks/actionOutputHTMLBefore.md index b7a354d392..310269e4a7 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOutputHTMLBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionOutputHTMLBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Before HTML output' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' @@ -23,5 +23,5 @@ description: 'This hook is used to filter the whole HTML page before it is rende ## Call of the Hook in the origin file ```php -Hook::exec('actionOutputHTMLBefore', ['html' => &$html]) +Hook::exec('actionOutputHTMLBefore', ['html' => &$html]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOverrideEmployeeImage.md b/modules/concepts/hooks/list-of-hooks/actionOverrideEmployeeImage.md index 4a1497f9e8..fe9134cc57 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOverrideEmployeeImage.md +++ b/modules/concepts/hooks/list-of-hooks/actionOverrideEmployeeImage.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Get Employee Image' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Employee.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Employee.php' file: classes/Employee.php locations: - 'front office' @@ -29,5 +29,5 @@ Hook::exec( 'employee' => $this, 'imageUrl' => &$imageUrl, ] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreePrice.md b/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreePrice.md new file mode 100644 index 0000000000..e09f83ccf4 --- /dev/null +++ b/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreePrice.md @@ -0,0 +1,27 @@ +--- +Title: actionOverrideShippingFreePrice +hidden: true +hookTitle: 'Override price that determines free shipping' +files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' + file: classes/Cart.php +locations: + - 'front office' +type: action +hookAliases: +array_return: false +check_exceptions: false +chain: false +origin: core +description: 'Allows modules to override the free shipping price and return their custom value, for example to specify it by zone or other criteria.' + +--- + +{{% hookDescriptor %}} + +## Call of the Hook in the origin file + +```php +Hook::exec('actionOverrideShippingFreePrice', ['shippingFreePrice' => &$shippingFreePrice, 'id_zone' => $id_zone, 'id_currency' => $this->id_currency]); +``` diff --git a/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreeWeight.md b/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreeWeight.md new file mode 100644 index 0000000000..f7c9305105 --- /dev/null +++ b/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreeWeight.md @@ -0,0 +1,27 @@ +--- +Title: actionOverrideShippingFreeWeight +hidden: true +hookTitle: 'Override weight that determines free shipping' +files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' + file: classes/Cart.php +locations: + - 'front office' +type: action +hookAliases: +array_return: false +check_exceptions: false +chain: false +origin: core +description: 'Allows modules to override the free shipping weight and return their custom value, for example to specify it by zone or other criteria.' + +--- + +{{% hookDescriptor %}} + +## Call of the Hook in the origin file + +```php +Hook::exec('actionOverrideShippingFreeWeight', ['shippingFreeWeight' => &$shippingFreeWeight, 'id_zone' => $id_zone, 'id_currency' => $this->id_currency]); +``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPDFInvoiceRender.md b/modules/concepts/hooks/list-of-hooks/actionPDFInvoiceRender.md index 0d50ffe81d..42cd18b1bb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPDFInvoiceRender.md +++ b/modules/concepts/hooks/list-of-hooks/actionPDFInvoiceRender.md @@ -1,10 +1,10 @@ --- Title: actionPDFInvoiceRender hidden: true -hookTitle: +hookTitle: 'PDF Invoice - Render' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/PDF/OrderInvoicePdfGenerator.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/PDF/OrderInvoicePdfGenerator.php' file: src/Adapter/PDF/OrderInvoicePdfGenerator.php locations: - 'front office' @@ -14,7 +14,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: '' +description: 'This hook is called when a PDF invoice is rendered from the Front Office and the Back Office' --- @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionPDFInvoiceRender', ['order_invoice_list' => $order_invoice_list]) +Hook::exec('actionPDFInvoiceRender', ['order_invoice_list' => $order_invoice_list]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPasswordRenew.md b/modules/concepts/hooks/list-of-hooks/actionPasswordRenew.md index 7096aed06f..f41bb20cd6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPasswordRenew.md +++ b/modules/concepts/hooks/list-of-hooks/actionPasswordRenew.md @@ -1,10 +1,10 @@ --- Title: actionPasswordRenew hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/PasswordController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/PasswordController.php' file: controllers/front/PasswordController.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionPasswordRenew', ['customer' => $customer, 'password' => $password]) +Hook::exec('actionPasswordRenew', ['customer' => $customer, 'password' => $password]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPaymentCCAdd.md b/modules/concepts/hooks/list-of-hooks/actionPaymentCCAdd.md index 7e0b08a132..27c24d770c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPaymentCCAdd.md +++ b/modules/concepts/hooks/list-of-hooks/actionPaymentCCAdd.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Payment CC added' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/order/OrderPayment.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderPayment.php' file: classes/order/OrderPayment.php locations: - 'front office' type: action -hookAliases: - - paymentCCAdded +hookAliases: actionPaymentCCAdd array_return: false check_exceptions: false chain: false @@ -33,5 +32,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionPaymentCCAdd', ['paymentCC' => $this]) +Hook::exec('actionPaymentCCAdd', ['paymentCC' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPaymentConfirmation.md b/modules/concepts/hooks/list-of-hooks/actionPaymentConfirmation.md index d515284f48..9ecad185de 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPaymentConfirmation.md +++ b/modules/concepts/hooks/list-of-hooks/actionPaymentConfirmation.md @@ -4,15 +4,14 @@ hidden: true hookTitle: 'Payment confirmation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/order/OrderHistory.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderHistory.php' file: classes/order/OrderHistory.php locations: - 'front office' type: action -hookAliases: - - paymentConfirm +hookAliases: actionPaymentConfirmation array_return: false -check_exceptions: false +check_exceptions: true chain: false origin: core description: 'This hook displays new elements after the payment is validated' @@ -33,5 +32,5 @@ description: 'This hook displays new elements after the payment is validated' ## Call of the Hook in the origin file ```php -Hook::exec('actionPaymentConfirmation', ['id_order' => (int) $order->id], null, false, true, false, $order->id_shop) +Hook::exec('actionPaymentConfirmation', ['id_order' => (int) $order->id], null, false, true, false, $order->id_shop); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentCart.md b/modules/concepts/hooks/list-of-hooks/actionPresentCart.md index 3dd0888c94..65c71cafce 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentCart.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentCart.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Cart Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Cart/CartPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Cart/CartPresenter.php' file: src/Adapter/Presenter/Cart/CartPresenter.php locations: - 'front office' @@ -24,6 +24,6 @@ description: 'This hook is called before a cart is presented' ```php Hook::exec('actionPresentCart', - ['presentedCart' => &$result] - ) + ['presentedCart' => &$cartLazyArray] + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentCategory.md b/modules/concepts/hooks/list-of-hooks/actionPresentCategory.md index 3cf4b09a3b..2898044b51 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentCategory.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentCategory.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Category Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Presenter/Category/CategoryPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Category/CategoryPresenter.php' file: src/Adapter/Presenter/Category/CategoryPresenter.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentManufacturer.md b/modules/concepts/hooks/list-of-hooks/actionPresentManufacturer.md index ff948337bc..8fd7caf6d3 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentManufacturer.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentManufacturer.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Manufacturer Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Presenter/Manufacturer/ManufacturerPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Manufacturer/ManufacturerPresenter.php' file: src/Adapter/Presenter/Manufacturer/ManufacturerPresenter.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentModule.md b/modules/concepts/hooks/list-of-hooks/actionPresentModule.md index e83d9b8d58..b0d270f49b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentModule.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentModule.md @@ -1,10 +1,10 @@ --- Title: actionPresentModule hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Module/ModulePresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Module/ModulePresenter.php' file: src/Adapter/Presenter/Module/ModulePresenter.php locations: - 'front office' @@ -25,5 +25,5 @@ description: '' ```php Hook::exec('actionPresentModule', ['presentedModule' => &$result] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentObject.md b/modules/concepts/hooks/list-of-hooks/actionPresentObject.md index 283b58db4f..0479f5f54e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentObject.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentObject.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Object Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Presenter/Object/ObjectPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Object/ObjectPresenter.php' file: src/Adapter/Presenter/Object/ObjectPresenter.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentOrder.md b/modules/concepts/hooks/list-of-hooks/actionPresentOrder.md index e387d01677..fed48f00af 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentOrder.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentOrder.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Order Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Order/OrderPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Order/OrderPresenter.php' file: src/Adapter/Presenter/Order/OrderPresenter.php locations: - 'front office' @@ -25,5 +25,5 @@ description: 'This hook is called before an order is presented' ```php Hook::exec('actionPresentOrder', ['presentedOrder' => &$orderLazyArray] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentOrderReturn.md b/modules/concepts/hooks/list-of-hooks/actionPresentOrderReturn.md index 022f73a926..dc5cf43b4c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentOrderReturn.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentOrderReturn.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Order Return Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Order/OrderReturnPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Order/OrderReturnPresenter.php' file: src/Adapter/Presenter/Order/OrderReturnPresenter.php locations: - 'front office' @@ -25,5 +25,5 @@ description: 'This hook is called before an order return is presented' ```php Hook::exec('actionPresentOrderReturn', ['presentedOrderReturn' => &$orderReturnLazyArray] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentPaymentOptions.md b/modules/concepts/hooks/list-of-hooks/actionPresentPaymentOptions.md index 31961bb309..091b8a913d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentPaymentOptions.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentPaymentOptions.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Payment options Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/checkout/PaymentOptionsFinder.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/PaymentOptionsFinder.php' file: classes/checkout/PaymentOptionsFinder.php locations: - 'front office' @@ -34,5 +34,5 @@ description: 'This hook is called before payment options are presented' ```php Hook::exec('actionPresentPaymentOptions', ['paymentOptions' => &$paymentOptions] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentProduct.md b/modules/concepts/hooks/list-of-hooks/actionPresentProduct.md index f2a89d8868..bba4276ac3 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentProduct.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentProduct.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Product Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Product/ProductPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Product/ProductPresenter.php' file: src/Adapter/Presenter/Product/ProductPresenter.php locations: - 'front office' @@ -25,7 +25,7 @@ description: 'This hook is called before a product is presented' ```php Hook::exec('actionPresentProduct', ['presentedProduct' => &$productLazyArray] - ) + ); ``` ## Example on how to change values diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentProductListing.md b/modules/concepts/hooks/list-of-hooks/actionPresentProductListing.md index f4e14c4063..70d795fdc1 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentProductListing.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentProductListing.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Product Listing Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Product/ProductListingPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Product/ProductListingPresenter.php' file: src/Adapter/Presenter/Product/ProductListingPresenter.php locations: - 'front office' @@ -25,5 +25,5 @@ description: 'This hook is called before a product listing is presented' ```php Hook::exec('actionPresentProductListing', ['presentedProduct' => &$productListingLazyArray] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentStore.md b/modules/concepts/hooks/list-of-hooks/actionPresentStore.md index 7f4544918f..4def6615ff 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentStore.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentStore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Store Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Presenter/Store/StorePresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Store/StorePresenter.php' file: src/Adapter/Presenter/Store/StorePresenter.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentSupplier.md b/modules/concepts/hooks/list-of-hooks/actionPresentSupplier.md index dcfe09d7e6..8e9492aa57 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentSupplier.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentSupplier.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Supplier Presenter' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/Adapter/Presenter/Supplier/SupplierPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Supplier/SupplierPresenter.php' file: src/Adapter/Presenter/Supplier/SupplierPresenter.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionProductAdd.md b/modules/concepts/hooks/list-of-hooks/actionProductAdd.md index 3a6dbe6cd4..b8aa01dae2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductAdd.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductAdd.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Product creation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Product/ProductDuplicator.php' - file: src/Adapter/Product/ProductDuplicator.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Update/ProductDuplicator.php' + file: src/Adapter/Product/Update/ProductDuplicator.php locations: - 'front office' type: action -hookAliases: - - addproduct +hookAliases: actionProductAdd array_return: false check_exceptions: false chain: false @@ -24,8 +23,8 @@ description: 'This hook is displayed after a product is created' ## Call of the Hook in the origin file ```php -dispatchWithParameters( +$this->hookDispatcher->dispatchWithParameters( 'actionProductAdd', ['id_product_old' => $oldProductId, 'id_product' => $newProductId, 'product' => $newProduct] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductAttributeDelete.md b/modules/concepts/hooks/list-of-hooks/actionProductAttributeDelete.md index 6d08d21f42..f3ecf493e2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductAttributeDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductAttributeDelete.md @@ -4,18 +4,17 @@ hidden: true hookTitle: 'Product attribute deletion' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' type: action -hookAliases: - - deleteProductAttribute +hookAliases: actionProductAttributeDelete array_return: false check_exceptions: false chain: false origin: core -description: "This hook is displayed when a product's attribute is deleted" +description: 'This hook is displayed when a product''s attribute is deleted' --- @@ -24,5 +23,5 @@ description: "This hook is displayed when a product's attribute is deleted" ## Call of the Hook in the origin file ```php -Hook::exec('actionProductAttributeDelete', ['id_product_attribute' => 0, 'id_product' => (int) $this->id, 'deleteAllAttributes' => true]) +Hook::exec('actionProductAttributeDelete', ['id_product_attribute' => 0, 'id_product' => (int) $this->id, 'deleteAllAttributes' => true]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductAttributeUpdate.md b/modules/concepts/hooks/list-of-hooks/actionProductAttributeUpdate.md index b5caa9bb8d..b1687f6fd2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductAttributeUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductAttributeUpdate.md @@ -4,18 +4,17 @@ hidden: true hookTitle: 'Product attribute update' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' type: action -hookAliases: - - updateProductAttribute +hookAliases: actionProductAttributeUpdate array_return: false check_exceptions: false chain: false origin: core -description: "This hook is displayed when a product's attribute is updated" +description: 'This hook is displayed when a product''s attribute is updated' --- @@ -24,5 +23,5 @@ description: "This hook is displayed when a product's attribute is updated" ## Call of the Hook in the origin file ```php -Hook::exec('actionProductAttributeUpdate', ['id_product_attribute' => (int) $id_product_attribute]) +Hook::exec('actionProductAttributeUpdate', ['id_product_attribute' => (int) $id_product_attribute]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductCancel.md b/modules/concepts/hooks/list-of-hooks/actionProductCancel.md index 0109d8e0d7..ca4ff49c02 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductCancel.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductCancel.md @@ -4,15 +4,14 @@ hidden: true hookTitle: 'Product cancelled' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Order/CommandHandler/IssueStandardRefundHandler.php' - file: src/Adapter/Order/CommandHandler/IssueStandardRefundHandler.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/CancelOrderProductHandler.php' + file: src/Adapter/Order/CommandHandler/CancelOrderProductHandler.php locations: - 'front office' type: action -hookAliases: - - cancelProduct +hookAliases: actionProductCancel array_return: false -check_exceptions: false +check_exceptions: true chain: false origin: core description: 'This hook is called when you cancel a product in an order' @@ -24,5 +23,5 @@ description: 'This hook is called when you cancel a product in an order' ## Call of the Hook in the origin file ```php -Hook::exec('actionProductCancel', ['order' => $order, 'id_order_detail' => (int) $orderDetailId, 'cancel_quantity' => $productRefund['quantity'], 'action' => CancellationActionType::STANDARD_REFUND], null, false, true, false, $order->id_shop) +Hook::exec('actionProductCancel', ['order' => $order, 'id_order_detail' => (int) $orderDetail->id_order_detail, 'cancel_quantity' => $qty_cancel_product, 'action' => CancellationActionType::CANCEL_PRODUCT], null, false, true, false, $order->id_shop); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductCoverage.md b/modules/concepts/hooks/list-of-hooks/actionProductCoverage.md index 1ff81f15d0..6eb08c9eb6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductCoverage.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductCoverage.md @@ -1,10 +1,10 @@ --- Title: actionProductCoverage hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/stock/StockManager.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/stock/StockManager.php' file: classes/stock/StockManager.php locations: - 'front office' @@ -25,10 +25,10 @@ description: '' ```php Hook::exec( 'actionProductCoverage', - [ - 'id_product' => $id_product, - 'id_product_attribute' => $id_product_attribute, - 'warehouse' => $warehouse, - ] - ) + [ + 'id_product' => $id_product, + 'id_product_attribute' => $id_product_attribute, + 'warehouse' => $warehouse, + ] + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductDelete.md b/modules/concepts/hooks/list-of-hooks/actionProductDelete.md index 150cb6749e..376ac4cc26 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductDelete.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Product deletion' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' type: action -hookAliases: - - deleteproduct +hookAliases: actionProductDelete array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is called when a product is deleted' ## Call of the Hook in the origin file ```php -Hook::exec('actionProductDelete', ['id_product' => (int) $this->id, 'product' => $this]) +Hook::exec('actionProductDelete', ['id_product' => (int) $this->id, 'product' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductOutOfStock.md b/modules/concepts/hooks/list-of-hooks/actionProductOutOfStock.md index f49ca0e19a..5bfde0a4cc 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductOutOfStock.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductOutOfStock.md @@ -1,7 +1,7 @@ --- Title: actionProductOutOfStock hidden: true -hookTitle: Out-of-stock product +hookTitle: 'Out-of-stock product' files: - theme: classic @@ -16,7 +16,7 @@ locations: - front office type: action hookAliases: - - productOutOfStock + - actionProductOutOfStock origin: theme array_return: false check_exceptions: false @@ -30,5 +30,5 @@ description: This hook displays new action buttons if a product is out of stock ## Call of the Hook in the origin file ```php -{hook h='actionProductOutOfStock' product=$product} +{hook h='actionProductOutOfStock' product=$product}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductPriceCalculation.md b/modules/concepts/hooks/list-of-hooks/actionProductPriceCalculation.md index 854abeec12..1309d64c8d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductPriceCalculation.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductPriceCalculation.md @@ -4,17 +4,17 @@ hidden: true hookTitle: 'Product Price Calculation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.1.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - - 'back office' + - 'front office' type: action hookAliases: array_return: false check_exceptions: false chain: false origin: core -description: 'This hook is called into the priceCalculation method to be able to override the price calculatio' +description: 'This hook is called into the priceCalculation method to be able to override the price calculation' --- @@ -24,30 +24,30 @@ description: 'This hook is called into the priceCalculation method to be able to ```php Hook::exec('actionProductPriceCalculation', [ - 'id_shop' => $id_shop, - 'id_product' => $id_product, - 'id_product_attribute' => $id_product_attribute, - 'id_customization' => $id_customization, - 'id_country' => $id_country, - 'id_state' => $id_state, - 'zip_code' => $zipcode, - 'id_currency' => $id_currency, - 'id_group' => $id_group, - 'id_cart' => $id_cart, - 'id_customer' => $id_customer, - 'use_customer_price' => $use_customer_price, - 'quantity' => $quantity, - 'real_quantity' => $real_quantity, - 'use_tax' => $use_tax, - 'decimals' => $decimals, - 'only_reduc' => $only_reduc, - 'use_reduc' => $use_reduc, - 'with_ecotax' => $with_ecotax, - 'specific_price' => &$specific_price, - 'use_group_reduction' => $use_group_reduction, - 'address' => $address, - 'context' => $context, - 'specific_price_reduction' => &$specific_price_reduction, - 'price' => &$price, -]); + 'id_shop' => $id_shop, + 'id_product' => $id_product, + 'id_product_attribute' => $id_product_attribute, + 'id_customization' => $id_customization, + 'id_country' => $id_country, + 'id_state' => $id_state, + 'zip_code' => $zipcode, + 'id_currency' => $id_currency, + 'id_group' => $id_group, + 'id_cart' => $id_cart, + 'id_customer' => $id_customer, + 'use_customer_price' => $use_customer_price, + 'quantity' => $quantity, + 'real_quantity' => $real_quantity, + 'use_tax' => $use_tax, + 'decimals' => $decimals, + 'only_reduc' => $only_reduc, + 'use_reduc' => $use_reduc, + 'with_ecotax' => $with_ecotax, + 'specific_price' => &$specific_price, + 'use_group_reduction' => $use_group_reduction, + 'address' => $address, + 'context' => $context, + 'specific_price_reduction' => &$specific_price_reduction, + 'price' => &$price, + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductSave.md b/modules/concepts/hooks/list-of-hooks/actionProductSave.md index 8047bbc49e..dc97a9fb47 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductSave.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Saving products' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' type: action -hookAliases: - - afterSaveProduct +hookAliases: actionProductSave array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is called while saving products' ## Call of the Hook in the origin file ```php -Hook::exec('actionProductSave', ['id_product' => (int) $this->id, 'product' => $this]) +Hook::exec('actionProductSave', ['id_product' => (int) $this->id, 'product' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductSearchAfter.md b/modules/concepts/hooks/list-of-hooks/actionProductSearchAfter.md index 2cc5edac5b..bd5ffb0632 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductSearchAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductSearchAfter.md @@ -24,5 +24,5 @@ description: 'This hook is called after the product search. Parameters are alrea ## Call of the Hook in the origin file ```php -Hook::exec('actionProductSearchAfter', $searchVariables) +Hook::exec('actionProductSearchAfter', $searchVariables); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryAfter.md b/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryAfter.md index e28119be0a..019253b5fe 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Runs an action after ProductSearchProviderInterface::RunQuery()' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/ProductListingFrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/ProductListingFrontController.php' file: classes/controller/ProductListingFrontController.php locations: - 'front office' @@ -26,5 +26,5 @@ description: 'Required to return a previous state of an SQL query or/and to chan Hook::exec('actionProductSearchProviderRunQueryAfter', [ 'query' => $query, 'result' => $result, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryBefore.md b/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryBefore.md index d8b4585ca5..33a5721eba 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Runs an action before ProductSearchProviderInterface::RunQuery()' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/ProductListingFrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/ProductListingFrontController.php' file: classes/controller/ProductListingFrontController.php locations: - 'front office' @@ -25,5 +25,5 @@ description: 'Required to modify an SQL query before executing it' ```php Hook::exec('actionProductSearchProviderRunQueryBefore', [ 'query' => $query, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductUpdate.md b/modules/concepts/hooks/list-of-hooks/actionProductUpdate.md index be2e569ae2..ba0d9bd700 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductUpdate.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Product update' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Product/AdminProductWrapper.php' - file: src/Adapter/Product/AdminProductWrapper.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' + file: classes/Product.php locations: - 'back office' type: action -hookAliases: - - updateproduct +hookAliases: actionProductUpdate array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is displayed after a product has been updated' ## Call of the Hook in the origin file ```php -Hook::exec('actionProductUpdate', ['id_product' => (int) $product->id, 'product' => $product]) +Hook::exec('actionProductUpdate', ['id_product' => (int) $product->id, 'product' => $product]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionSearch.md b/modules/concepts/hooks/list-of-hooks/actionSearch.md index 2198ccee2e..d174284a88 100644 --- a/modules/concepts/hooks/list-of-hooks/actionSearch.md +++ b/modules/concepts/hooks/list-of-hooks/actionSearch.md @@ -1,10 +1,10 @@ --- Title: actionSearch hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Search/SearchProductSearchProvider.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Search/SearchProductSearchProvider.php' file: src/Adapter/Search/SearchProductSearchProvider.php locations: - 'front office' @@ -39,5 +39,5 @@ Hook::exec('actionSearch', [ // deprecated since 1.7.x 'expr' => $queryString, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionSetInvoice.md b/modules/concepts/hooks/list-of-hooks/actionSetInvoice.md index 17f4820459..8f3457b44d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionSetInvoice.md +++ b/modules/concepts/hooks/list-of-hooks/actionSetInvoice.md @@ -1,10 +1,10 @@ --- Title: actionSetInvoice hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/order/Order.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/Order.php' file: classes/order/Order.php locations: - 'front office' @@ -38,5 +38,5 @@ Hook::exec('actionSetInvoice', [ get_class($this) => $this, get_class($order_invoice) => $order_invoice, 'use_existing_payment' => (bool) $use_existing_payment, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionShopDataDuplication.md b/modules/concepts/hooks/list-of-hooks/actionShopDataDuplication.md index 722bf0bd3e..76259ec245 100644 --- a/modules/concepts/hooks/list-of-hooks/actionShopDataDuplication.md +++ b/modules/concepts/hooks/list-of-hooks/actionShopDataDuplication.md @@ -1,10 +1,10 @@ --- Title: actionShopDataDuplication hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/shop/Shop.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/shop/Shop.php' file: classes/shop/Shop.php locations: - 'front office' @@ -36,5 +36,5 @@ description: '' Hook::exec('actionShopDataDuplication', [ 'old_id_shop' => (int) $old_id, 'new_id_shop' => (int) $this->id, - ], $m['id_module']) + ], $m['id_module']); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionSubmitAccountBefore.md b/modules/concepts/hooks/list-of-hooks/actionSubmitAccountBefore.md index 10390a2a9b..25693e801a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionSubmitAccountBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionSubmitAccountBefore.md @@ -1,21 +1,20 @@ --- Title: actionSubmitAccountBefore hidden: true -hookTitle: +hookTitle: 'Before customer account creation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/RegistrationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/RegistrationController.php' file: controllers/front/RegistrationController.php locations: - 'front office' type: action -hookAliases: - - actionBeforeSubmitAccount -array_return: false +hookAliases: actionSubmitAccountBefore +array_return: true check_exceptions: false chain: false origin: core -description: '' +description: 'This hook is called before a customer account creation' --- @@ -24,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionSubmitAccountBefore', [], null, true) +Hook::exec('actionSubmitAccountBefore', [], null, true); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md b/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md index 68b23f6387..2757202893 100644 --- a/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md +++ b/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md @@ -1,10 +1,10 @@ --- Title: actionSubmitCustomerAddressForm hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerAddressForm.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerAddressForm.php' file: classes/form/CustomerAddressForm.php locations: - 'front office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionSubmitCustomerAddressForm', ['address' => &$address]) +Hook::exec('actionSubmitCustomerAddressForm', ['address' => &$address]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionUpdateCartAddress.md b/modules/concepts/hooks/list-of-hooks/actionUpdateCartAddress.md index 716ba55322..d73a270891 100644 --- a/modules/concepts/hooks/list-of-hooks/actionUpdateCartAddress.md +++ b/modules/concepts/hooks/list-of-hooks/actionUpdateCartAddress.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Triggers after changing address on the cart' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/Cart.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' file: classes/Cart.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionUpdateLangAfter.md b/modules/concepts/hooks/list-of-hooks/actionUpdateLangAfter.md index be976ce859..9244238862 100644 --- a/modules/concepts/hooks/list-of-hooks/actionUpdateLangAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionUpdateLangAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Update "lang" tables' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Language.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Language.php' file: classes/Language.php locations: - 'front office' @@ -23,5 +23,5 @@ description: 'Update "lang" tables after adding or updating a language' ## Call of the Hook in the origin file ```php -Hook::exec('actionUpdateLangAfter', ['lang' => $language]) +Hook::exec('actionUpdateLangAfter', ['lang' => $language]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionUpdateQuantity.md b/modules/concepts/hooks/list-of-hooks/actionUpdateQuantity.md index 38f53d83b9..aefe8ce4bc 100644 --- a/modules/concepts/hooks/list-of-hooks/actionUpdateQuantity.md +++ b/modules/concepts/hooks/list-of-hooks/actionUpdateQuantity.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Quantity update' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/stock/StockAvailable.php' - file: classes/stock/StockAvailable.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Combination/Update/CombinationStockUpdater.php' + file: src/Adapter/Product/Combination/Update/CombinationStockUpdater.php locations: - 'front office' type: action -hookAliases: - - updateQuantity +hookAliases: actionUpdateQuantity array_return: false check_exceptions: false chain: false @@ -21,27 +20,15 @@ description: 'Quantity is updated only when a customer effectively places their {{% hookDescriptor %}} -## Parameters details - -```php - (int) Product ID, - 'id_product_attribute' => (int) Product attribute ID, - 'quantity' => (int) New product quantity - ); -``` - ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionUpdateQuantity', - [ - 'id_product' => $id_product, - 'id_product_attribute' => 0, - 'quantity' => $product_quantity, - 'id_shop' => $id_shop, - ] - ) +$this->hookDispatcher->dispatchWithParameters('actionUpdateQuantity', + [ + 'id_product' => $stockAvailable->id_product, + 'id_product_attribute' => $stockAvailable->id_product_attribute, + 'quantity' => $stockAvailable->quantity, + 'delta_quantity' => $deltaQuantity, + 'id_shop' => $stockAvailable->id_shop, + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateCartRule.md b/modules/concepts/hooks/list-of-hooks/actionValidateCartRule.md index 1990d082e7..43a312cc55 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateCartRule.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateCartRule.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Alter cart rule validation process' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/CartRule.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/CartRule.php' file: classes/CartRule.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateCustomerAddressForm.md b/modules/concepts/hooks/list-of-hooks/actionValidateCustomerAddressForm.md index d83ccf1b78..7dd710a63e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateCustomerAddressForm.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateCustomerAddressForm.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Customer address form validation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerAddressForm.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerAddressForm.php' file: classes/form/CustomerAddressForm.php locations: - 'front office' @@ -32,5 +32,5 @@ description: 'This hook is called when a customer submit its address form' ## Call of the Hook in the origin file ```php -Hook::exec('actionValidateCustomerAddressForm', ['form' => $this]) +Hook::exec('actionValidateCustomerAddressForm', ['form' => $this]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateOrder.md b/modules/concepts/hooks/list-of-hooks/actionValidateOrder.md index 907d107383..5b00d31f0a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateOrder.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateOrder.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'New orders' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/PaymentModule.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/PaymentModule.php' file: classes/PaymentModule.php locations: - 'front office' @@ -44,7 +44,7 @@ Hook::exec('actionValidateOrder', [ 'customer' => $this->context->customer, 'currency' => $this->context->currency, 'orderStatus' => $order_status, - ]) + ]); ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateOrderAfter.md b/modules/concepts/hooks/list-of-hooks/actionValidateOrderAfter.md index 96008fe277..f121998c5f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateOrderAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateOrderAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'After validating an order' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/PaymentModule.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/PaymentModule.php' file: classes/PaymentModule.php locations: - 'front office' @@ -47,5 +47,5 @@ Hook::exec( 'currency' => $this->context->currency, 'orderStatus' => new OrderState(isset($order) ? $order->current_state : null), ] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateOrderBefore.md b/modules/concepts/hooks/list-of-hooks/actionValidateOrderBefore.md index 5f0f1bba9d..17159cc1f0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateOrderBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateOrderBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Before validating an order' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/PaymentModule.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/PaymentModule.php' file: classes/PaymentModule.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md b/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md index c82b9fa29e..585f6924ca 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md @@ -1,10 +1,10 @@ --- Title: actionValidateStepComplete hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/checkout/CheckoutDeliveryStep.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/CheckoutDeliveryStep.php' file: classes/checkout/CheckoutDeliveryStep.php locations: - 'front office' @@ -42,5 +42,5 @@ Hook::exec( 'completed' => &$isComplete, ], Module::getModuleIdByName($currentDeliveryOption['external_module_name']) - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionWatermark.md b/modules/concepts/hooks/list-of-hooks/actionWatermark.md index a7a41a8e0f..52bcb67285 100644 --- a/modules/concepts/hooks/list-of-hooks/actionWatermark.md +++ b/modules/concepts/hooks/list-of-hooks/actionWatermark.md @@ -1,16 +1,15 @@ --- Title: actionWatermark hidden: true -hookTitle: Watermark +hookTitle: 'Watermark' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Product/Image/Uploader/ProductImageUploader.php' - file: src/Adapter/Product/Image/Uploader/ProductImageUploader.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Import/ImageCopier.php' + file: src/Adapter/Import/ImageCopier.php locations: - 'front office' type: action -hookAliases: - - watermark +hookAliases: actionWatermark array_return: false check_exceptions: false chain: false @@ -21,21 +20,14 @@ description: '' {{% hookDescriptor %}} -## Parameters details - -```php - (int) Image ID, - 'id_product' => (int) Product ID - ); -``` - ## Call of the Hook in the origin file ```php -dispatchWithParameters( - 'actionWatermark', - ['id_image' => $imageId->getValue(), 'id_product' => $productId] - ) +$this->hookDispatcher->dispatchWithParameters( + 'actionWatermark', + [ + 'id_image' => $imageId, + 'id_product' => $entityId, + ] + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md b/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md index ba3538094a..7dec0d939e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md +++ b/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md @@ -1,7 +1,7 @@ --- Title: actionWishlistAddProduct hidden: true -hookTitle: +hookTitle: '' files: - module: blockwishlist @@ -29,5 +29,5 @@ Hook::exec('actionWishlistAddProduct', [ 'customerId' => $this->context->customer->id, 'idProduct' => $id_product, 'idProductAttribute' => $id_product_attribute, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/addWebserviceResources.md b/modules/concepts/hooks/list-of-hooks/addWebserviceResources.md index 500042bece..c0d5d0b48f 100644 --- a/modules/concepts/hooks/list-of-hooks/addWebserviceResources.md +++ b/modules/concepts/hooks/list-of-hooks/addWebserviceResources.md @@ -4,14 +4,14 @@ hidden: true hookTitle: 'Add extra webservice resource' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/webservice/WebserviceRequest.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/webservice/WebserviceRequest.php' file: classes/webservice/WebserviceRequest.php locations: - 'front office' -type: null +type: action hookAliases: array_return: true -check_exceptions: true +check_exceptions: false chain: false origin: core description: 'This hook is called when webservice resources list in webservice controller' @@ -23,5 +23,5 @@ description: 'This hook is called when webservice resources list in webservice c ## Call of the Hook in the origin file ```php -Hook::exec('addWebserviceResources', ['resources' => $resources], null, true, false) +Hook::exec('addWebserviceResources', ['resources' => $resources], null, true, false); ``` diff --git a/modules/concepts/hooks/list-of-hooks/additionalCustomerAddressFields.md b/modules/concepts/hooks/list-of-hooks/additionalCustomerAddressFields.md index 81a224eb29..4b3dd0cdc6 100644 --- a/modules/concepts/hooks/list-of-hooks/additionalCustomerAddressFields.md +++ b/modules/concepts/hooks/list-of-hooks/additionalCustomerAddressFields.md @@ -4,11 +4,11 @@ hidden: true hookTitle: 'Add fields to the Customer address form' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerAddressFormatter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerAddressFormatter.php' file: classes/form/CustomerAddressFormatter.php locations: - 'front office' -type: null +type: action hookAliases: array_return: true check_exceptions: false @@ -23,5 +23,5 @@ description: 'This hook returns an array of FormFields to add them to the custom ## Call of the Hook in the origin file ```php -Hook::exec('additionalCustomerAddressFields', ['fields' => &$format], null, true) +Hook::exec('additionalCustomerAddressFields', ['fields' => &$format], null, true); ``` diff --git a/modules/concepts/hooks/list-of-hooks/additionalCustomerFormFields.md b/modules/concepts/hooks/list-of-hooks/additionalCustomerFormFields.md index 97424a8a3a..faac2f248b 100644 --- a/modules/concepts/hooks/list-of-hooks/additionalCustomerFormFields.md +++ b/modules/concepts/hooks/list-of-hooks/additionalCustomerFormFields.md @@ -4,11 +4,11 @@ hidden: true hookTitle: 'Add fields to the Customer form' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerFormatter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerFormatter.php' file: classes/form/CustomerFormatter.php locations: - 'front office' -type: null +type: action hookAliases: array_return: true check_exceptions: false @@ -23,5 +23,5 @@ description: 'This hook returns an array of FormFields to add them to the custom ## Call of the Hook in the origin file ```php -Hook::exec('additionalCustomerFormFields', ['fields' => &$format], null, true) +Hook::exec('additionalCustomerFormFields', ['fields' => &$format], null, true); ``` diff --git a/modules/concepts/hooks/list-of-hooks/dashboardData.md b/modules/concepts/hooks/list-of-hooks/dashboardData.md index 02e2cb14be..b7551b1d8e 100644 --- a/modules/concepts/hooks/list-of-hooks/dashboardData.md +++ b/modules/concepts/hooks/list-of-hooks/dashboardData.md @@ -1,14 +1,14 @@ --- Title: dashboardData hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminDashboardController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' file: controllers/admin/AdminDashboardController.php locations: - 'back office' -type: null +type: action hookAliases: array_return: true check_exceptions: false @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('dashboardData', $params, $id_module, true) +Hook::exec('dashboardData', $params, $id_module, true); ``` diff --git a/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md b/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md index a419119489..55ae193b21 100644 --- a/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md +++ b/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md @@ -1,14 +1,14 @@ --- Title: dashboardZoneOne hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminDashboardController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' file: controllers/admin/AdminDashboardController.php locations: - 'back office' -type: null +type: action hookAliases: array_return: false check_exceptions: false @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('dashboardZoneOne', $params) +Hook::exec('dashboardZoneOne', $params); ``` diff --git a/modules/concepts/hooks/list-of-hooks/dashboardZoneThree.md b/modules/concepts/hooks/list-of-hooks/dashboardZoneThree.md index 7f586222ca..1da504a372 100644 --- a/modules/concepts/hooks/list-of-hooks/dashboardZoneThree.md +++ b/modules/concepts/hooks/list-of-hooks/dashboardZoneThree.md @@ -4,11 +4,11 @@ hidden: true hookTitle: 'Dashboard column three' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminDashboardController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' file: controllers/admin/AdminDashboardController.php locations: - 'back office' -type: null +type: action hookAliases: array_return: false check_exceptions: false @@ -33,5 +33,5 @@ description: 'This hook is displayed in the third column of the dashboard' ## Call of the Hook in the origin file ```php -Hook::exec('dashboardZoneThree', $params) +Hook::exec('dashboardZoneThree', $params); ``` diff --git a/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md b/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md index 521510fca9..c0326e0ea1 100644 --- a/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md +++ b/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md @@ -1,14 +1,14 @@ --- Title: dashboardZoneTwo hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminDashboardController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' file: controllers/admin/AdminDashboardController.php locations: - 'back office' -type: null +type: action hookAliases: array_return: false check_exceptions: false @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('dashboardZoneTwo', $params) +Hook::exec('dashboardZoneTwo', $params); ``` diff --git a/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md b/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md index ce5015c9d0..ff46d2cc0f 100644 --- a/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md +++ b/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md @@ -1,15 +1,15 @@ --- Title: deleteProductAttribute hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' -type: null -hookAliases: +type: action +hookAliases: deleteProductAttribute array_return: false check_exceptions: false chain: false @@ -30,5 +30,5 @@ Hook::exec( 'id_product' => $this->id, 'deleteAllAttributes' => false, ] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdditionalCustomerAddressFields.md b/modules/concepts/hooks/list-of-hooks/displayAdditionalCustomerAddressFields.md index 38e23e11c8..0a51cc8fff 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdditionalCustomerAddressFields.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdditionalCustomerAddressFields.md @@ -1,7 +1,7 @@ --- Title: displayAdditionalCustomerAddressFields hidden: true -hookTitle: Display additional customer address fields +hookTitle: 'Display additional customer address fields' files: - theme: classic @@ -29,5 +29,5 @@ description: This hook allows to display extra field values added in an address ## Call of the Hook in the origin file ```php -{hook h='displayAdditionalCustomerAddressFields' address=$address} +{hook h='displayAdditionalCustomerAddressFields' address=$address}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAddressSelectorBottom.md b/modules/concepts/hooks/list-of-hooks/displayAddressSelectorBottom.md index fee34614e5..e9ce834762 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAddressSelectorBottom.md +++ b/modules/concepts/hooks/list-of-hooks/displayAddressSelectorBottom.md @@ -1,7 +1,7 @@ --- Title: displayAddressSelectorBottom hidden: true -hookTitle: +hookTitle: 'After address selection on checkout page' files: - theme: Classic @@ -25,5 +25,5 @@ description: '' ## Call of the Hook in the origin file ```php -{hook h='displayAddressSelectorBottom'} +{hook h='displayAddressSelectorBottom'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md b/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md index f5b8d81343..dc7a1253b0 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md @@ -1,11 +1,11 @@ --- Title: displayAdminAfterHeader hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/new-theme/template/light_display_layout.tpl' - file: admin-dev/themes/new-theme/template/light_display_layout.tpl + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Layout/light_layout.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Layout/light_layout.html.twig locations: - 'back office' type: display @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -{hook h='displayAdminAfterHeader'} +{{ renderhook('displayAdminAfterHeader', {}) }}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminCustomers.md b/modules/concepts/hooks/list-of-hooks/displayAdminCustomers.md index ec135bf145..dea8f2d1c9 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminCustomers.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminCustomers.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Display new elements in the Back Office, tab AdminCustomers' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Customer/view.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Customer/view.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Customer/view.html.twig locations: - 'back office' @@ -33,5 +33,5 @@ description: 'This hook launches modules when the AdminCustomers tab is displaye ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminCustomers', {'id_customer': customerInformation.customerId.value}) }} +{{ renderhook('displayAdminCustomers', {id_customer: customerInformation.customerId.value}) }}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminEndContent.md b/modules/concepts/hooks/list-of-hooks/displayAdminEndContent.md index ffeb7ebe8c..f3bf421f86 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminEndContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminEndContent.md @@ -4,8 +4,8 @@ hidden: true hookTitle: 'Administration end of content' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/new-theme/template/light_display_layout.tpl' - file: admin-dev/themes/new-theme/template/light_display_layout.tpl + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Layout/light_layout.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Layout/light_layout.html.twig locations: - 'back office' type: display @@ -23,5 +23,5 @@ description: 'This hook is displayed at the end of the main content, before the ## Call of the Hook in the origin file ```php -{hook h='displayAdminEndContent'} +{{ renderhook('displayAdminEndContent', {}) }}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminForm.md b/modules/concepts/hooks/list-of-hooks/displayAdminForm.md index 904faa0cad..d4a3a9b6e4 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminForm.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminForm.md @@ -1,10 +1,10 @@ --- Title: displayAdminForm hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/default/template/helpers/form/form.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/form/form.tpl' file: admin-dev/themes/default/template/helpers/form/form.tpl locations: - 'back office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -{hook h='displayAdminForm' fieldset=$f} +{hook h='displayAdminForm' fieldset=$f}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminGridTableAfter.md b/modules/concepts/hooks/list-of-hooks/displayAdminGridTableAfter.md index 9f39b20a7c..61ba5eabf0 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminGridTableAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminGridTableAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Display after Grid table' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Blocks/table.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Blocks/table.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Blocks/table.html.twig locations: - 'back office' @@ -36,9 +36,9 @@ description: 'This hook adds new blocks after Grid component table' ```php {{ renderhook('displayAdminGridTableAfter', { - 'grid': grid, - 'legacy_controller': app.request.attributes.get('_legacy_controller'), - 'controller': app.request.attributes.get('_controller') + grid: grid, + legacy_controller: app.request.attributes.get('_legacy_controller'), + controller: app.request.attributes.get('_controller') }) -}} +}}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminGridTableBefore.md b/modules/concepts/hooks/list-of-hooks/displayAdminGridTableBefore.md index ea1fb03124..d88ba89d41 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminGridTableBefore.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminGridTableBefore.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Display before Grid table' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Blocks/table.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Blocks/table.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Blocks/table.html.twig locations: - 'back office' @@ -36,9 +36,9 @@ description: 'This hook adds new blocks before Grid component table' ```php {{ renderhook('displayAdminGridTableBefore', { - 'grid': grid, - 'legacy_controller': app.request.attributes.get('_legacy_controller'), - 'controller': app.request.attributes.get('_controller') + grid: grid, + legacy_controller: app.request.attributes.get('_legacy_controller'), + controller: app.request.attributes.get('_controller') }) -}} +}}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminListAfter.md b/modules/concepts/hooks/list-of-hooks/displayAdminListAfter.md index d8d721609e..58a71f4bc3 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminListAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminListAfter.md @@ -1,15 +1,15 @@ --- Title: displayAdminListAfter hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/default/template/helpers/list/list_footer.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/list/list_footer.tpl' file: admin-dev/themes/default/template/helpers/list/list_footer.tpl locations: - 'back office' type: display -hookAliases: +hookAliases: displayAdminListAfter array_return: false check_exceptions: false chain: false @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -{hook h='displayAdminListAfter'} +{hook h='displayAdminListAfter'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminListBefore.md b/modules/concepts/hooks/list-of-hooks/displayAdminListBefore.md index 9bb7a99cce..e508ffdaa2 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminListBefore.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminListBefore.md @@ -1,15 +1,15 @@ --- Title: displayAdminListBefore hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/default/template/helpers/list/list_header.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/list/list_header.tpl' file: admin-dev/themes/default/template/helpers/list/list_header.tpl locations: - 'back office' type: display -hookAliases: +hookAliases: displayAdminListBefore array_return: false check_exceptions: false chain: false @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -{hook h='displayAdminListBefore'} +{hook h='displayAdminListBefore'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminLogin.md b/modules/concepts/hooks/list-of-hooks/displayAdminLogin.md index dc78e2f688..eef64afce3 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminLogin.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminLogin.md @@ -4,7 +4,7 @@ hidden: true hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/PrestaShopBundle/Resources/views/Admin/Layout/login_layout.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Layout/login_layout.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Layout/login_layout.html.twig locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md b/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md index 37567c2111..1d7f9e9926 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md @@ -1,11 +1,11 @@ --- Title: displayAdminNavBarBeforeEnd hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/new-theme/template/components/layout/nav_bar.tpl' - file: admin-dev/themes/new-theme/template/components/layout/nav_bar.tpl + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/nav_bar.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/nav_bar.html.twig locations: - 'back office' type: display @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -{hook h='displayAdminNavBarBeforeEnd'} +{{ renderhook('displayAdminNavBarBeforeEnd') }}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md b/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md index e5a2233ae6..d31e39eb9f 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md @@ -1,10 +1,10 @@ --- Title: displayAdminOptions hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/default/template/helpers/options/options.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/options/options.tpl' file: admin-dev/themes/default/template/helpers/options/options.tpl locations: - 'back office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -{hook h='displayAdminOptions'} +{hook h='displayAdminOptions'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOrder.md b/modules/concepts/hooks/list-of-hooks/displayAdminOrder.md index 00fafab473..f2cc2bc8d4 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrder.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrder.md @@ -4,14 +4,12 @@ hidden: true hookTitle: 'Display new elements in the Back Office, tab AdminOrder' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig locations: - 'back office' type: display -hookAliases: - - adminOrder -hasExample: true +hookAliases: displayAdminOrder array_return: false check_exceptions: false chain: false @@ -34,7 +32,7 @@ description: 'This hook launches modules when the AdminOrder tab is displayed in ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminOrder', {'id_order': orderForViewing.id}) }} +{{ renderhook('displayAdminOrder', {id_order: orderForViewing.id}) }}; ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOrderCreateExtraButtons.md b/modules/concepts/hooks/list-of-hooks/displayAdminOrderCreateExtraButtons.md index 1ee403ee32..e03efea51f 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderCreateExtraButtons.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderCreateExtraButtons.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Add buttons on the create order page dropdown' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/Blocks/Create/summary.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/Blocks/Create/summary.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/Blocks/Create/summary.html.twig locations: - 'back office' @@ -23,5 +23,5 @@ description: 'Add buttons on the create order page dropdown' ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminOrderCreateExtraButtons') }} +{{ renderhook('displayAdminOrderCreateExtraButtons') }}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOrderMain.md b/modules/concepts/hooks/list-of-hooks/displayAdminOrderMain.md index 259e2dd744..1abfe75eef 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderMain.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderMain.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Admin Order Main Column' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig locations: - 'back office' @@ -33,7 +33,7 @@ description: 'This hook displays content in the order view page in the main colu ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminOrderMain', {'id_order': orderForViewing.id}) }} +{{ renderhook('displayAdminOrderMain', {id_order: orderForViewing.id}) }}; ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOrderMainBottom.md b/modules/concepts/hooks/list-of-hooks/displayAdminOrderMainBottom.md index 8a268cb859..c9692e48af 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderMainBottom.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderMainBottom.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Admin Order Main Column Bottom' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig locations: - 'back office' @@ -32,5 +32,5 @@ description: 'This hook displays content in the order view page at the bottom of ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminOrderMainBottom', {'id_order': orderForViewing.id}) }} +{{ renderhook('displayAdminOrderMainBottom', {id_order: orderForViewing.id}) }}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOrderSide.md b/modules/concepts/hooks/list-of-hooks/displayAdminOrderSide.md index b7691035d2..610d9f20bc 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderSide.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderSide.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Admin Order Side Column' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig locations: - 'back office' @@ -33,5 +33,5 @@ description: 'This hook displays content in the order view page in the side colu ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminOrderSide', {'id_order': orderForViewing.id}) }} +{{ renderhook('displayAdminOrderSide', {id_order: orderForViewing.id}) }}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOrderSideBottom.md b/modules/concepts/hooks/list-of-hooks/displayAdminOrderSideBottom.md index f86b1926c5..02fdee5d27 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderSideBottom.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderSideBottom.md @@ -1,10 +1,10 @@ --- Title: displayAdminOrderSideBottom hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig locations: - 'back office' @@ -33,7 +33,7 @@ description: '' ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminOrderSideBottom', {'id_order': orderForViewing.id}) }} +{{ renderhook('displayAdminOrderSideBottom', {id_order: orderForViewing.id}) }}; ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminStatsModules.md b/modules/concepts/hooks/list-of-hooks/displayAdminStatsModules.md index 1d7f0cff81..32bffc3fa3 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminStatsModules.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminStatsModules.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Stats - Modules' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminStatsTabController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminStatsTabController.php' file: controllers/admin/AdminStatsTabController.php locations: - 'back office' -type: display -hookAliases: - - AdminStatsModules +type: action +hookAliases: displayAdminStatsModules array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('displayAdminStatsModules', [], $module_instance->id) +Hook::exec('displayAdminStatsModules', [], $module_instance->id); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminThemesListAfter.md b/modules/concepts/hooks/list-of-hooks/displayAdminThemesListAfter.md index 7580b83e9b..c575da2abc 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminThemesListAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminThemesListAfter.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'BO themes list extra content' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Improve/Design/Theme/index.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Improve/Design/Theme/index.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Improve/Design/Theme/index.html.twig locations: - 'back office' @@ -32,5 +32,5 @@ description: 'This hook displays content after the themes list in the back offic ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminThemesListAfter', { 'current_theme_name': currentlyUsedTheme.get('name') }) }} +{{ renderhook('displayAdminThemesListAfter', {current_theme_name: currentlyUsedTheme.get('name')}) }}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminView.md b/modules/concepts/hooks/list-of-hooks/displayAdminView.md index 5f039dfafb..725595ac59 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminView.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminView.md @@ -1,10 +1,10 @@ --- Title: displayAdminView hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/default/template/helpers/view/view.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/view/view.tpl' file: admin-dev/themes/default/template/helpers/view/view.tpl locations: - 'back office' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -{hook h='displayAdminView'} +{hook h='displayAdminView'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAfterBodyOpeningTag.md b/modules/concepts/hooks/list-of-hooks/displayAfterBodyOpeningTag.md index 15a7690637..fdfbc6cf9a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAfterBodyOpeningTag.md +++ b/modules/concepts/hooks/list-of-hooks/displayAfterBodyOpeningTag.md @@ -1,7 +1,7 @@ --- Title: displayAfterBodyOpeningTag hidden: true -hookTitle: Very top of pages +hookTitle: 'Very top of pages' files: - theme: classic @@ -29,5 +29,5 @@ description: Use this hook for advertisement or modals you want to load first ## Call of the Hook in the origin file ```php -{hook h='displayAfterBodyOpeningTag'} +{hook h='displayAfterBodyOpeningTag'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAfterCarrier.md b/modules/concepts/hooks/list-of-hooks/displayAfterCarrier.md index 4a2ee8514f..93267eb973 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAfterCarrier.md +++ b/modules/concepts/hooks/list-of-hooks/displayAfterCarrier.md @@ -4,11 +4,11 @@ hidden: true hookTitle: 'After carriers list' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/checkout/CheckoutDeliveryStep.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/CheckoutDeliveryStep.php' file: classes/checkout/CheckoutDeliveryStep.php locations: - 'front office' -type: display +type: action hookAliases: array_return: false check_exceptions: false @@ -23,5 +23,5 @@ description: 'This hook is displayed after the carrier list in Front Office' ## Call of the Hook in the origin file ```php -Hook::exec('displayAfterCarrier', ['cart' => $this->getCheckoutSession()->getCart()]) +Hook::exec('displayAfterCarrier', ['cart' => $this->getCheckoutSession()->getCart()]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAfterProductThumbs.md b/modules/concepts/hooks/list-of-hooks/displayAfterProductThumbs.md index 1b917d17f7..04dbefddab 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAfterProductThumbs.md +++ b/modules/concepts/hooks/list-of-hooks/displayAfterProductThumbs.md @@ -1,7 +1,7 @@ --- Title: displayAfterProductThumbs hidden: true -hookTitle: Display extra content below product thumbs +hookTitle: 'Display extra content below product thumbs' files: - theme: classic @@ -29,5 +29,5 @@ description: This hook displays new elements below product images ex. additional ## Call of the Hook in the origin file ```php -{hook h='displayAfterProductThumbs' product=$product} +{hook h='displayAfterProductThumbs' product=$product}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAfterTitleTag.md b/modules/concepts/hooks/list-of-hooks/displayAfterTitleTag.md index 3e0658984a..22026daf24 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAfterTitleTag.md +++ b/modules/concepts/hooks/list-of-hooks/displayAfterTitleTag.md @@ -1,7 +1,7 @@ --- Title: displayAfterTitleTag hidden: true -hookTitle: After title tag +hookTitle: 'After title tag' files: - theme: classic @@ -29,5 +29,5 @@ description: Use this hook to add content after title tag ## Call of the Hook in the origin file ```php -{hook h='displayAfterTitleTag'} +{hook h='displayAfterTitleTag'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayBackOfficeEmployeeMenu.md b/modules/concepts/hooks/list-of-hooks/displayBackOfficeEmployeeMenu.md index 04b8b58a5c..dd684b831b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBackOfficeEmployeeMenu.md +++ b/modules/concepts/hooks/list-of-hooks/displayBackOfficeEmployeeMenu.md @@ -4,8 +4,8 @@ hidden: true hookTitle: 'Administration Employee menu' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Bridge/Smarty/HeaderConfigurator.php' - file: src/PrestaShopBundle/Bridge/Smarty/HeaderConfigurator.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Twig/Component/EmployeeDropdown.php' + file: src/PrestaShopBundle/Twig/Component/EmployeeDropdown.php locations: - 'back office' type: display @@ -32,11 +32,10 @@ description: 'This hook is displayed in the employee menu' ## Call of the Hook in the origin file ```php -dispatchWithParameters( - 'displaybackOfficeEmployeeMenu', - [ - 'links' => $menuLinksCollections, - ] - ) -``` - +$this->hookDispatcher->dispatchWithParameters( + 'displayBackOfficeEmployeeMenu', + [ + 'links' => $menuLinksCollections, + ] + ); +``` \ No newline at end of file diff --git a/modules/concepts/hooks/list-of-hooks/displayBackOfficeFooter.md b/modules/concepts/hooks/list-of-hooks/displayBackOfficeFooter.md index 195870303f..d17f59d9e4 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBackOfficeFooter.md +++ b/modules/concepts/hooks/list-of-hooks/displayBackOfficeFooter.md @@ -4,8 +4,8 @@ hidden: true hookTitle: 'Administration panel footer' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/src/PrestaShopBundle/Resources/views/Admin/Component/Layout/footer.html.twig' - file: src/PrestaShopBundle/Resources/views/Admin/Component/Layout/footer.html.twig + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Layout/legacy_layout.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Layout/legacy_layout.html.twig locations: - 'back office' type: display @@ -23,5 +23,5 @@ description: 'This hook is displayed within the admin panel''s footer' ## Call of the Hook in the origin file ```php -{{ renderhook('displayBackOfficeFooter') }}; +{{ renderhook('displayBackOfficeFooter', {}) }}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayBackOfficeHeader.md b/modules/concepts/hooks/list-of-hooks/displayBackOfficeHeader.md index bf0393c962..3744e7f283 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBackOfficeHeader.md +++ b/modules/concepts/hooks/list-of-hooks/displayBackOfficeHeader.md @@ -1,16 +1,15 @@ --- -Title: displaybackOfficeHeader +Title: displayBackOfficeHeader hidden: true hookTitle: 'Administration panel header' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' file: classes/controller/AdminController.php locations: - 'back office' -type: display -hookAliases: - - backOfficeHeader +type: action +hookAliases: displayBackOfficeHeader array_return: false check_exceptions: false chain: false @@ -24,6 +23,5 @@ description: 'This hook is displayed in the header of the admin panel' ## Call of the Hook in the origin file ```php -Hook::exec('displaybackOfficeHeader') -``` - +Hook::exec('displayBackOfficeHeader'); +``` \ No newline at end of file diff --git a/modules/concepts/hooks/list-of-hooks/displayBackOfficeTop.md b/modules/concepts/hooks/list-of-hooks/displayBackOfficeTop.md index 064568f84e..c37edd441b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBackOfficeTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayBackOfficeTop.md @@ -1,16 +1,15 @@ --- -Title: displaybackOfficeTop +Title: displayBackOfficeTop hidden: true hookTitle: 'Administration panel hover the tabs' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/AdminController.php' - file: classes/controller/AdminController.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Layout/legacy_layout.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Layout/legacy_layout.html.twig locations: - 'back office' type: display -hookAliases: - - backOfficeTop +hookAliases: displayBackOfficeTop array_return: false check_exceptions: false chain: false @@ -24,6 +23,5 @@ description: 'This hook is displayed on the roll hover of the tabs within the ad ## Call of the Hook in the origin file ```php -Hook::exec('displaybackOfficeTop') -``` - +{{ renderhook('displayBackOfficeTop') }}; +``` \ No newline at end of file diff --git a/modules/concepts/hooks/list-of-hooks/displayBanner.md b/modules/concepts/hooks/list-of-hooks/displayBanner.md index bc2f08eccc..9bb3c52957 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBanner.md +++ b/modules/concepts/hooks/list-of-hooks/displayBanner.md @@ -1,7 +1,7 @@ --- Title: displayBanner hidden: true -hookTitle: Very top of pages +hookTitle: 'Very top of pages' files: - theme: classic @@ -29,5 +29,5 @@ description: Use this hook for banners on top of every pages ## Call of the Hook in the origin file ```php -{hook h='displayBanner'} +{hook h='displayBanner'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayBeforeBodyClosingTag.md b/modules/concepts/hooks/list-of-hooks/displayBeforeBodyClosingTag.md index e7319740ee..382fa6f812 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBeforeBodyClosingTag.md +++ b/modules/concepts/hooks/list-of-hooks/displayBeforeBodyClosingTag.md @@ -1,7 +1,7 @@ --- Title: displayBeforeBodyClosingTag hidden: true -hookTitle: Very bottom of pages +hookTitle: 'Very bottom of pages' files: - theme: classic @@ -29,5 +29,5 @@ description: Use this hook for your modals or any content you want to load at th ## Call of the Hook in the origin file ```php -{hook h='displayBeforeBodyClosingTag'} +{hook h='displayBeforeBodyClosingTag'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayBeforeCarrier.md b/modules/concepts/hooks/list-of-hooks/displayBeforeCarrier.md index 5c090362a6..9a838dae14 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBeforeCarrier.md +++ b/modules/concepts/hooks/list-of-hooks/displayBeforeCarrier.md @@ -8,9 +8,8 @@ files: file: classes/checkout/CheckoutDeliveryStep.php locations: - 'front office' -type: display -hookAliases: - - beforeCarrier +type: action +hookAliases: displayBeforeCarrier array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook is displayed before the carrier list in Front Office' ## Call of the Hook in the origin file ```php -Hook::exec('displayBeforeCarrier', ['cart' => $this->getCheckoutSession()->getCart()]) +Hook::exec('displayBeforeCarrier', ['cart' => $this->getCheckoutSession()->getCart()]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCMSDisputeInformation.md b/modules/concepts/hooks/list-of-hooks/displayCMSDisputeInformation.md index 82f6267858..9d09dc7f09 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCMSDisputeInformation.md +++ b/modules/concepts/hooks/list-of-hooks/displayCMSDisputeInformation.md @@ -1,7 +1,7 @@ --- Title: displayCMSDisputeInformation hidden: true -hookTitle: displayCMSDisputeInformation +hookTitle: '' files: - theme: classic @@ -29,5 +29,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayCMSDisputeInformation'} +{hook h='displayCMSDisputeInformation'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCMSPrintButton.md b/modules/concepts/hooks/list-of-hooks/displayCMSPrintButton.md index f91d0fc3ff..64dff50725 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCMSPrintButton.md +++ b/modules/concepts/hooks/list-of-hooks/displayCMSPrintButton.md @@ -1,7 +1,7 @@ --- Title: displayCMSPrintButton hidden: true -hookTitle: displayCMSPrintButton +hookTitle: '' files: - theme: classic @@ -29,5 +29,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayCMSPrintButton'} +{hook h='displayCMSPrintButton'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCarrierExtraContent.md b/modules/concepts/hooks/list-of-hooks/displayCarrierExtraContent.md index 2a79febf5e..ece631051e 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCarrierExtraContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayCarrierExtraContent.md @@ -4,11 +4,11 @@ hidden: true hookTitle: 'Display additional content for a carrier (e.g pickup points)' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.0.x/classes/checkout/DeliveryOptionsFinder.php' - file: classes/checkout/DeliveryOptionsFinder.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Shipment/DeliveryOptionsProvider.php' + file: src/Adapter/Shipment/DeliveryOptionsProvider.php locations: - 'front office' -type: display +type: action hookAliases: array_return: false check_exceptions: false @@ -23,5 +23,5 @@ description: 'This hook calls only the module related to the carrier, in order t ## Call of the Hook in the origin file ```php -Hook::exec('displayCarrierExtraContent', ['carrier' => $carrier], $moduleId) +Hook::exec('displayCarrierExtraContent', ['carrier' => $carrier['instance']], Module::getModuleIdByName($carrier['instance']->id)); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCartExtraProductActions.md b/modules/concepts/hooks/list-of-hooks/displayCartExtraProductActions.md index bc0bd4da79..070e793c5b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCartExtraProductActions.md +++ b/modules/concepts/hooks/list-of-hooks/displayCartExtraProductActions.md @@ -1,7 +1,7 @@ --- Title: displayCartExtraProductActions hidden: true -hookTitle: Extra buttons in shopping cart +hookTitle: 'Extra buttons in shopping cart' files: - theme: classic @@ -29,5 +29,5 @@ description: This hook adds extra buttons to the product lines, in the shopping ## Call of the Hook in the origin file ```php -{hook h='displayCartExtraProductActions' product=$product} +{hook h='displayCartExtraProductActions' product=$product}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCartModalContent.md b/modules/concepts/hooks/list-of-hooks/displayCartModalContent.md index 1dc23e0319..11ea6993bb 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCartModalContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayCartModalContent.md @@ -1,7 +1,7 @@ --- Title: displayCartModalContent hidden: true -hookTitle: Content of Add-to-cart modal +hookTitle: 'Content of Add-to-cart modal' files: - module: ps_shoppingcart @@ -33,5 +33,5 @@ description: This hook displays content in the middle of the window that appears ## Call of the Hook in the origin file ```php -{hook h='displayCartModalContent' product=$product} +{hook h='displayCartModalContent' product=$product}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCartModalFooter.md b/modules/concepts/hooks/list-of-hooks/displayCartModalFooter.md index ca8261186a..e39f7c737a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCartModalFooter.md +++ b/modules/concepts/hooks/list-of-hooks/displayCartModalFooter.md @@ -1,7 +1,7 @@ --- Title: displayCartModalFooter hidden: true -hookTitle: Bottom of Add-to-cart modal +hookTitle: 'Bottom of Add-to-cart modal' files: - module: ps_shoppingcart @@ -33,5 +33,5 @@ description: This hook displays content in the bottom of window that appears aft ## Call of the Hook in the origin file ```php -{hook h='displayCartModalFooter' product=$product} +{hook h='displayCartModalFooter' product=$product}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCheckoutBeforeConfirmation.md b/modules/concepts/hooks/list-of-hooks/displayCheckoutBeforeConfirmation.md index 1293eeed35..70beb5c569 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCheckoutBeforeConfirmation.md +++ b/modules/concepts/hooks/list-of-hooks/displayCheckoutBeforeConfirmation.md @@ -1,7 +1,7 @@ --- Title: displayCheckoutBeforeConfirmation hidden: true -hookTitle: Show custom content before checkout confirmation +hookTitle: 'Show custom content before checkout confirmation' files: - theme: classic @@ -29,5 +29,5 @@ description: This hook allows you to display custom content at the end of checko ## Call of the Hook in the origin file ```php -{hook h='displayCheckoutBeforeConfirmation'} +{hook h='displayCheckoutBeforeConfirmation'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCheckoutSubtotalDetails.md b/modules/concepts/hooks/list-of-hooks/displayCheckoutSubtotalDetails.md index a036420233..7a2b0f1079 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCheckoutSubtotalDetails.md +++ b/modules/concepts/hooks/list-of-hooks/displayCheckoutSubtotalDetails.md @@ -1,7 +1,7 @@ --- Title: displayCheckoutSubtotalDetails hidden: true -hookTitle: displayCheckoutSubtotalDetails +hookTitle: '' files: - theme: classic @@ -37,5 +37,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayCheckoutSubtotalDetails' subtotal=$subtotal} +{hook h='displayCheckoutSubtotalDetails' subtotal=$subtotal}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCheckoutSummaryTop.md b/modules/concepts/hooks/list-of-hooks/displayCheckoutSummaryTop.md index a6f37de68d..d76b05daa5 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCheckoutSummaryTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayCheckoutSummaryTop.md @@ -1,7 +1,7 @@ --- Title: displayCheckoutSummaryTop hidden: true -hookTitle: Cart summary top +hookTitle: 'Cart summary top' files: - theme: classic @@ -29,5 +29,5 @@ description: This hook allows you to display new elements in top of cart summary ## Call of the Hook in the origin file ```php -{hook h='displayCheckoutSummaryTop'} +{hook h='displayCheckoutSummaryTop'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayContactContent.md b/modules/concepts/hooks/list-of-hooks/displayContactContent.md index b35ace890f..fdb9d4ee74 100644 --- a/modules/concepts/hooks/list-of-hooks/displayContactContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayContactContent.md @@ -1,7 +1,7 @@ --- Title: displayContactContent hidden: true -hookTitle: Content wrapper section of the contact page +hookTitle: 'Content wrapper section of the contact page' files: - theme: classic @@ -29,5 +29,5 @@ description: This hook displays new elements in the content wrapper of the conta ## Call of the Hook in the origin file ```php -{hook h='displayContactContent'} +{hook h='displayContactContent'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayContactLeftColumn.md b/modules/concepts/hooks/list-of-hooks/displayContactLeftColumn.md index 43788fdd9d..3e53cef91c 100644 --- a/modules/concepts/hooks/list-of-hooks/displayContactLeftColumn.md +++ b/modules/concepts/hooks/list-of-hooks/displayContactLeftColumn.md @@ -1,7 +1,7 @@ --- Title: displayContactLeftColumn hidden: true -hookTitle: Left column blocks on the contact page +hookTitle: 'Left column blocks on the contact page' files: - theme: classic @@ -29,5 +29,5 @@ description: This hook displays new elements in the left-hand column of the cont ## Call of the Hook in the origin file ```php -{hook h='displayContactLeftColumn'} +{hook h='displayContactLeftColumn'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayContactRightColumn.md b/modules/concepts/hooks/list-of-hooks/displayContactRightColumn.md index 1b59f70219..4e2c8446d4 100644 --- a/modules/concepts/hooks/list-of-hooks/displayContactRightColumn.md +++ b/modules/concepts/hooks/list-of-hooks/displayContactRightColumn.md @@ -1,7 +1,7 @@ --- Title: displayContactRightColumn hidden: true -hookTitle: Right column blocks of the contact page +hookTitle: 'Right column blocks of the contact page' files: - theme: classic @@ -29,5 +29,5 @@ description: This hook displays new elements in the right-hand column of the con ## Call of the Hook in the origin file ```php -{hook h='displayContactRightColumn'} +{hook h='displayContactRightColumn'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayContentWrapperBottom.md b/modules/concepts/hooks/list-of-hooks/displayContentWrapperBottom.md index 23a8ff9f06..ac1ef263bb 100644 --- a/modules/concepts/hooks/list-of-hooks/displayContentWrapperBottom.md +++ b/modules/concepts/hooks/list-of-hooks/displayContentWrapperBottom.md @@ -40,5 +40,5 @@ description: 'This hook displays new elements in the bottom of the content wrapp ## Call of the Hook in the origin file ```php -{hook h='displayContentWrapperBottom'} +{hook h='displayContentWrapperBottom'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayContentWrapperTop.md b/modules/concepts/hooks/list-of-hooks/displayContentWrapperTop.md index 827b6fcfec..00ed42ba9d 100644 --- a/modules/concepts/hooks/list-of-hooks/displayContentWrapperTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayContentWrapperTop.md @@ -40,5 +40,5 @@ description: 'This hook displays new elements in the top of the content wrapper' ## Call of the Hook in the origin file ```php -{hook h='displayContentWrapperTop'} +{hook h='displayContentWrapperTop'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCrossSellingShoppingCart.md b/modules/concepts/hooks/list-of-hooks/displayCrossSellingShoppingCart.md index ec8873c80a..e6054d01d0 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCrossSellingShoppingCart.md +++ b/modules/concepts/hooks/list-of-hooks/displayCrossSellingShoppingCart.md @@ -1,7 +1,7 @@ --- Title: displayCrossSellingShoppingCart hidden: true -hookTitle: displayCrossSellingShoppingCart +hookTitle: '' files: - theme: classic @@ -29,5 +29,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayCrossSellingShoppingCart'} +{hook h='displayCrossSellingShoppingCart'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCustomerAccount.md b/modules/concepts/hooks/list-of-hooks/displayCustomerAccount.md index 5c784d3075..50d8c8264f 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomerAccount.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomerAccount.md @@ -1,7 +1,7 @@ --- Title: displayCustomerAccount hidden: true -hookTitle: Customer account displayed in Front Office +hookTitle: 'Customer account displayed in Front Office' files: - theme: classic @@ -34,5 +34,5 @@ description: This hook displays new elements on the customer account page ## Call of the Hook in the origin file ```php -{hook h='displayCustomerAccount'} +{hook h='displayCustomerAccount'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCustomerAccountForm.md b/modules/concepts/hooks/list-of-hooks/displayCustomerAccountForm.md index 94849e81e8..0c7985853e 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomerAccountForm.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomerAccountForm.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Customer account creation form' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerForm.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerForm.php' file: classes/form/CustomerForm.php locations: - 'front office' -type: display -hookAliases: - - createAccountForm +type: action +hookAliases: displayCustomerAccountForm array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook displays some information on the form to create a custom ## Call of the Hook in the origin file ```php -Hook::exec('displayCustomerAccountForm') +Hook::exec('displayCustomerAccountForm'); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCustomerAccountFormTop.md b/modules/concepts/hooks/list-of-hooks/displayCustomerAccountFormTop.md index e3ae56602c..efa21aa24b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomerAccountFormTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomerAccountFormTop.md @@ -4,18 +4,17 @@ hidden: true hookTitle: 'Block above the form for create an account' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/RegistrationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/RegistrationController.php' file: controllers/front/RegistrationController.php locations: - 'front office' -type: display -hookAliases: - - createAccountTop +type: action +hookAliases: displayCustomerAccountFormTop array_return: false check_exceptions: false chain: false origin: core -description: "This hook is displayed above the customer's account creation form" +description: 'This hook is displayed above the customer''s account creation form' --- @@ -24,5 +23,5 @@ description: "This hook is displayed above the customer's account creation form" ## Call of the Hook in the origin file ```php -Hook::exec('displayCustomerAccountFormTop') +Hook::exec('displayCustomerAccountFormTop'); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCustomerLoginFormAfter.md b/modules/concepts/hooks/list-of-hooks/displayCustomerLoginFormAfter.md index 89b02d9c33..ee2651f982 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomerLoginFormAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomerLoginFormAfter.md @@ -1,7 +1,7 @@ --- Title: displayCustomerLoginFormAfter hidden: true -hookTitle: Display elements after login form +hookTitle: 'Display elements after login form' files: - theme: classic @@ -29,5 +29,5 @@ description: This hook displays new elements after the login form ## Call of the Hook in the origin file ```php -{hook h='displayCustomerLoginFormAfter'} +{hook h='displayCustomerLoginFormAfter'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCustomization.md b/modules/concepts/hooks/list-of-hooks/displayCustomization.md index 0515c42906..8aeff4f154 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomization.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomization.md @@ -1,14 +1,14 @@ --- Title: displayCustomization hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Product.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' -type: display +type: action hookAliases: array_return: false check_exceptions: false @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('displayCustomization', ['customization' => $row], (int) $row['id_module']) +Hook::exec('displayCustomization', ['customization' => $row], (int) $row['id_module']); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarIcons.md b/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarIcons.md index 12879b04b7..b91b049007 100644 --- a/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarIcons.md +++ b/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarIcons.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Display new elements in back office page with dashboard, on icons list' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Blocks/tools.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/8.2.x/src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Blocks/tools.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Blocks/tools.html.twig locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarTopMenu.md b/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarTopMenu.md index d21c0e5bc0..5a7d8eeb72 100644 --- a/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarTopMenu.md +++ b/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarTopMenu.md @@ -4,8 +4,8 @@ hidden: true hookTitle: 'Display new elements in back office page with a dashboard, on top Menu' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/new-theme/template/page_header_toolbar.tpl' - file: admin-dev/themes/new-theme/template/page_header_toolbar.tpl + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/toolbar.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/toolbar.html.twig locations: - 'back office' type: display @@ -23,5 +23,5 @@ description: 'This hook launches modules when a page with a dashboard is display ## Call of the Hook in the origin file ```php -{hook h='displayDashboardToolbarTopMenu'} +{{ renderhook('displayDashboardToolbarTopMenu') }}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayDashboardTop.md b/modules/concepts/hooks/list-of-hooks/displayDashboardTop.md index 40e9ca7b84..1e5e515ea9 100644 --- a/modules/concepts/hooks/list-of-hooks/displayDashboardTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayDashboardTop.md @@ -4,8 +4,8 @@ hidden: true hookTitle: 'Dashboard Top' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/new-theme/template/page_header_toolbar.tpl' - file: admin-dev/themes/new-theme/template/page_header_toolbar.tpl + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/toolbar.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/toolbar.html.twig locations: - 'back office' type: display @@ -14,7 +14,7 @@ array_return: false check_exceptions: false chain: false origin: core -description: "Displays the content in the dashboard's top area" +description: 'Displays the content in the dashboard''s top area' --- @@ -23,5 +23,5 @@ description: "Displays the content in the dashboard's top area" ## Call of the Hook in the origin file ```php -{hook h='displayDashboardTop'} +{{ renderhook('displayDashboardTop') }}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayEmptyModuleCategoryExtraMessage.md b/modules/concepts/hooks/list-of-hooks/displayEmptyModuleCategoryExtraMessage.md index 0a35ed78a3..0fa4f1d98b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayEmptyModuleCategoryExtraMessage.md +++ b/modules/concepts/hooks/list-of-hooks/displayEmptyModuleCategoryExtraMessage.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Extra message to display for an empty modules category' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Module/Includes/grid_manage_empty.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Module/Includes/grid_manage_empty.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Module/Includes/grid_manage_empty.html.twig locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/displayExpressCheckout.md b/modules/concepts/hooks/list-of-hooks/displayExpressCheckout.md index a72cba544f..8dee32aea8 100644 --- a/modules/concepts/hooks/list-of-hooks/displayExpressCheckout.md +++ b/modules/concepts/hooks/list-of-hooks/displayExpressCheckout.md @@ -1,7 +1,7 @@ --- Title: displayExpressCheckout hidden: true -hookTitle: displayExpressCheckout +hookTitle: '' files: - theme: classic @@ -29,5 +29,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayExpressCheckout'} +{hook h='displayExpressCheckout'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayFeatureForm.md b/modules/concepts/hooks/list-of-hooks/displayFeatureForm.md index 87603825d7..9e49dfe460 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFeatureForm.md +++ b/modules/concepts/hooks/list-of-hooks/displayFeatureForm.md @@ -4,7 +4,7 @@ hidden: true hookTitle: "Add fields to the form 'feature'" files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Catalog/Features/Blocks/form.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/8.2.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Catalog/Features/Blocks/form.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Catalog/Features/Blocks/form.html.twig locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/displayFeaturePostProcess.md b/modules/concepts/hooks/list-of-hooks/displayFeaturePostProcess.md index e8535cfe1d..ecb6177f37 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFeaturePostProcess.md +++ b/modules/concepts/hooks/list-of-hooks/displayFeaturePostProcess.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in admin feature' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminFeaturesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/8.2.x/controllers/admin/AdminFeaturesController.php' file: controllers/admin/AdminFeaturesController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/displayFeatureValueForm.md b/modules/concepts/hooks/list-of-hooks/displayFeatureValueForm.md index 3d1348d2aa..328fe6a72e 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFeatureValueForm.md +++ b/modules/concepts/hooks/list-of-hooks/displayFeatureValueForm.md @@ -4,7 +4,7 @@ hidden: true hookTitle: "Add fields to the form 'feature value'" files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/admin-dev/themes/default/template/controllers/feature_value/helpers/form/form.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/8.2.x/admin-dev/themes/default/template/controllers/feature_value/helpers/form/form.tpl' file: admin-dev/themes/default/template/controllers/feature_value/helpers/form/form.tpl locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/displayFeatureValuePostProcess.md b/modules/concepts/hooks/list-of-hooks/displayFeatureValuePostProcess.md index 2a6cbb60a8..d19b2bed28 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFeatureValuePostProcess.md +++ b/modules/concepts/hooks/list-of-hooks/displayFeatureValuePostProcess.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'On post-process in admin feature value' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/admin/AdminFeaturesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/8.2.x/controllers/admin/AdminFeaturesController.php' file: controllers/admin/AdminFeaturesController.php locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/displayFooter.md b/modules/concepts/hooks/list-of-hooks/displayFooter.md index d812edf0c3..a659a5d947 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFooter.md +++ b/modules/concepts/hooks/list-of-hooks/displayFooter.md @@ -1,7 +1,7 @@ --- Title: displayFooter hidden: true -hookTitle: Footer +hookTitle: 'Footer' files: - theme: classic @@ -30,5 +30,5 @@ description: This hook displays new blocks in the footer ## Call of the Hook in the origin file ```php -{hook h='displayFooter'} +{hook h='displayFooter'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayFooterAfter.md b/modules/concepts/hooks/list-of-hooks/displayFooterAfter.md index 7ac4c66983..2596aa9a74 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFooterAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayFooterAfter.md @@ -1,7 +1,7 @@ --- Title: displayFooterAfter hidden: true -hookTitle: displayFooterAfter +hookTitle: '' files: - theme: classic @@ -29,5 +29,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayFooterAfter'} +{hook h='displayFooterAfter'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayFooterBefore.md b/modules/concepts/hooks/list-of-hooks/displayFooterBefore.md index df46007fa3..e5a63b959f 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFooterBefore.md +++ b/modules/concepts/hooks/list-of-hooks/displayFooterBefore.md @@ -1,7 +1,7 @@ --- Title: displayFooterBefore hidden: true -hookTitle: displayFooterBefore +hookTitle: '' files: - theme: classic @@ -29,7 +29,7 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayFooterBefore'} +{hook h='displayFooterBefore'}; ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/displayFooterCategory.md b/modules/concepts/hooks/list-of-hooks/displayFooterCategory.md index 03b493dbcd..6c5cbdc2fa 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFooterCategory.md +++ b/modules/concepts/hooks/list-of-hooks/displayFooterCategory.md @@ -23,5 +23,5 @@ description: 'This hook adds new blocks under the products listing in a category ## Call of the Hook in the origin file ```php -{hook h="displayFooterCategory"} +{hook h='displayFooterCategory'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayFooterProduct.md b/modules/concepts/hooks/list-of-hooks/displayFooterProduct.md index 066906e625..23097f2c42 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFooterProduct.md +++ b/modules/concepts/hooks/list-of-hooks/displayFooterProduct.md @@ -1,7 +1,7 @@ --- Title: displayFooterProduct hidden: true -hookTitle: Product footer +hookTitle: 'Product footer' files: - theme: classic @@ -30,5 +30,5 @@ description: This hook adds new blocks under the product's description ## Call of the Hook in the origin file ```php -{hook h='displayFooterProduct' product=$product category=$category} +{hook h='displayFooterProduct' product=$product category=$category}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayGDPRConsent.md b/modules/concepts/hooks/list-of-hooks/displayGDPRConsent.md index eae833d34b..d5009b7c44 100644 --- a/modules/concepts/hooks/list-of-hooks/displayGDPRConsent.md +++ b/modules/concepts/hooks/list-of-hooks/displayGDPRConsent.md @@ -73,5 +73,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayGDPRConsent' id_module=$id_module} +{hook h='displayGDPRConsent' id_module=$id_module}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayHeader.md b/modules/concepts/hooks/list-of-hooks/displayHeader.md index 17a30a973c..a271a1a7e3 100644 --- a/modules/concepts/hooks/list-of-hooks/displayHeader.md +++ b/modules/concepts/hooks/list-of-hooks/displayHeader.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Pages html head section' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' -type: display -hookAliases: - - Header +type: action +hookAliases: displayHeader array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook adds additional elements in the head section of your pag ## Call of the Hook in the origin file ```php -Hook::exec('displayHeader') +Hook::exec('displayHeader'); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayHeaderCategory.md b/modules/concepts/hooks/list-of-hooks/displayHeaderCategory.md index b93c1bcfe6..e4366a7482 100644 --- a/modules/concepts/hooks/list-of-hooks/displayHeaderCategory.md +++ b/modules/concepts/hooks/list-of-hooks/displayHeaderCategory.md @@ -23,5 +23,5 @@ description: 'This hook adds new blocks above the products listing in a category ## Call of the Hook in the origin file ```php -{hook h="displayHeaderCategory"} +{hook h='displayHeaderCategory'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayHome.md b/modules/concepts/hooks/list-of-hooks/displayHome.md index 091fbb2546..a419fb455b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayHome.md +++ b/modules/concepts/hooks/list-of-hooks/displayHome.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Homepage content' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/IndexController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/IndexController.php' file: controllers/front/IndexController.php locations: - 'front office' -type: display -hookAliases: - - home +type: action +hookAliases: displayHome array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: 'This hook displays new elements on the homepage' ## Call of the Hook in the origin file ```php -Hook::exec('displayHome') +Hook::exec('displayHome'); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayInvoiceLegalFreeText.md b/modules/concepts/hooks/list-of-hooks/displayInvoiceLegalFreeText.md index 49c7e92128..ffdc8314ce 100644 --- a/modules/concepts/hooks/list-of-hooks/displayInvoiceLegalFreeText.md +++ b/modules/concepts/hooks/list-of-hooks/displayInvoiceLegalFreeText.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'PDF Invoice - Legal Free Text' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/pdf/HTMLTemplateInvoice.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/pdf/HTMLTemplateInvoice.php' file: classes/pdf/HTMLTemplateInvoice.php locations: - 'front office' @@ -23,5 +23,5 @@ description: 'This hook allows you to modify the legal free text on PDF invoices ## Call of the Hook in the origin file ```php -Hook::exec('displayInvoiceLegalFreeText', ['order' => $this->order]) +Hook::exec('displayInvoiceLegalFreeText', ['order' => $this->order]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayLeftColumn.md b/modules/concepts/hooks/list-of-hooks/displayLeftColumn.md index 917ee6ccca..4170fe8cb4 100644 --- a/modules/concepts/hooks/list-of-hooks/displayLeftColumn.md +++ b/modules/concepts/hooks/list-of-hooks/displayLeftColumn.md @@ -25,5 +25,5 @@ description: 'This hook displays new elements in the left-hand column of a page' ## Call of the Hook in the origin file ```php -{hook h='displayLeftColumn'} +{hook h='displayLeftColumn'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayLeftColumnProduct.md b/modules/concepts/hooks/list-of-hooks/displayLeftColumnProduct.md index 0e07f8fc61..ad2d2e5168 100644 --- a/modules/concepts/hooks/list-of-hooks/displayLeftColumnProduct.md +++ b/modules/concepts/hooks/list-of-hooks/displayLeftColumnProduct.md @@ -1,7 +1,7 @@ --- Title: displayLeftColumnProduct hidden: true -hookTitle: New elements on the product page (left column) +hookTitle: 'New elements on the product page (left column)' files: - theme: classic @@ -34,5 +34,5 @@ description: This hook displays new elements in the left-hand column of the prod ## Call of the Hook in the origin file ```php -{hook h='displayLeftColumnProduct' product=$product category=$category} +{hook h='displayLeftColumnProduct'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayMaintenance.md b/modules/concepts/hooks/list-of-hooks/displayMaintenance.md index bd349b3f98..df17ed0aee 100644 --- a/modules/concepts/hooks/list-of-hooks/displayMaintenance.md +++ b/modules/concepts/hooks/list-of-hooks/displayMaintenance.md @@ -4,11 +4,11 @@ hidden: true hookTitle: 'Maintenance Page' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' -type: display +type: action hookAliases: array_return: false check_exceptions: false @@ -23,5 +23,5 @@ description: 'This hook displays new elements on the maintenance page' ## Call of the Hook in the origin file ```php -Hook::exec('displayMaintenance', []) +Hook::exec('displayMaintenance'); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayModuleConfigureExtraButtons.md b/modules/concepts/hooks/list-of-hooks/displayModuleConfigureExtraButtons.md index 731d37792b..ce507c6f94 100644 --- a/modules/concepts/hooks/list-of-hooks/displayModuleConfigureExtraButtons.md +++ b/modules/concepts/hooks/list-of-hooks/displayModuleConfigureExtraButtons.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Module configuration - After toolbar buttons' files: - - url: 'https://github.com/PrestaShop/Prestashop/blob/8.0.x/admin-dev/themes/default/template/controllers/modules/configure.tpl' + url: 'https://github.com/PrestaShop/Prestashop/blob/8.2.x/admin-dev/themes/default/template/controllers/modules/configure.tpl' file: admin-dev/themes/default/template/controllers/modules/configure.tpl locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/displayMyAccountBlock.md b/modules/concepts/hooks/list-of-hooks/displayMyAccountBlock.md index 073e642529..e5e3b6253d 100644 --- a/modules/concepts/hooks/list-of-hooks/displayMyAccountBlock.md +++ b/modules/concepts/hooks/list-of-hooks/displayMyAccountBlock.md @@ -21,5 +21,5 @@ chain: false ## Call of the Hook in the origin file ```php -{hook h='displayMyAccountBlock'} +{hook h='displayMyAccountBlock'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayNav1.md b/modules/concepts/hooks/list-of-hooks/displayNav1.md index 3d452d706b..e94bdc950a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayNav1.md +++ b/modules/concepts/hooks/list-of-hooks/displayNav1.md @@ -33,5 +33,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayNav1'} +{hook h='displayNav1'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayNav2.md b/modules/concepts/hooks/list-of-hooks/displayNav2.md index 9d2b9c2319..28d61cff37 100644 --- a/modules/concepts/hooks/list-of-hooks/displayNav2.md +++ b/modules/concepts/hooks/list-of-hooks/displayNav2.md @@ -33,5 +33,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayNav2'} +{hook h='displayNav2'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayNavFullWidth.md b/modules/concepts/hooks/list-of-hooks/displayNavFullWidth.md index a80087edb7..0ca1f2bec8 100644 --- a/modules/concepts/hooks/list-of-hooks/displayNavFullWidth.md +++ b/modules/concepts/hooks/list-of-hooks/displayNavFullWidth.md @@ -1,7 +1,7 @@ --- Title: displayNavFullWidth hidden: true -hookTitle: Navigation +hookTitle: 'Navigation' files: - theme: classic @@ -33,5 +33,5 @@ description: This hook displays full width navigation menu at the top of your pa ## Call of the Hook in the origin file ```php -{hook h='displayNavFullWidth'} +{hook h='displayNavFullWidth'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayNewsletterRegistration.md b/modules/concepts/hooks/list-of-hooks/displayNewsletterRegistration.md index 6940d8a618..42cc0e97fa 100644 --- a/modules/concepts/hooks/list-of-hooks/displayNewsletterRegistration.md +++ b/modules/concepts/hooks/list-of-hooks/displayNewsletterRegistration.md @@ -45,5 +45,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayNewsletterRegistration'} +{hook h='displayNewsletterRegistration'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayNotFound.md b/modules/concepts/hooks/list-of-hooks/displayNotFound.md index d559f77c0c..e42574dd54 100644 --- a/modules/concepts/hooks/list-of-hooks/displayNotFound.md +++ b/modules/concepts/hooks/list-of-hooks/displayNotFound.md @@ -29,5 +29,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayNotFound'} +{hook h='displayNotFound'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation.md b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation.md index 8751e522f8..c51e2d7bb6 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation.md @@ -4,18 +4,17 @@ hidden: true hookTitle: 'Order confirmation page' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/OrderConfirmationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/OrderConfirmationController.php' file: controllers/front/OrderConfirmationController.php locations: - 'front office' -type: display -hookAliases: - - orderConfirmation +type: action +hookAliases: displayOrderConfirmation array_return: false check_exceptions: false chain: false origin: core -description: "This hook is called within an order's confirmation page" +description: 'This hook is called within an order''s confirmation page' --- @@ -33,5 +32,5 @@ description: "This hook is called within an order's confirmation page" ## Call of the Hook in the origin file ```php -Hook::exec('displayOrderConfirmation', ['order' => $order]) +Hook::exec('displayOrderConfirmation', ['order' => $order]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation1.md b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation1.md index 72681e04cc..32cb902e08 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation1.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation1.md @@ -29,5 +29,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayOrderConfirmation1'} +{hook h='displayOrderConfirmation1'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation2.md b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation2.md index 9fb93598e3..b12bf651c3 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation2.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation2.md @@ -29,5 +29,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayOrderConfirmation2'} +{hook h='displayOrderConfirmation2'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayOrderDetail.md b/modules/concepts/hooks/list-of-hooks/displayOrderDetail.md index eff4a8b1a6..8eeba6fd3e 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderDetail.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderDetail.md @@ -4,7 +4,7 @@ hidden: true hookTitle: 'Order detail' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/OrderDetailController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/OrderDetailController.php' file: controllers/front/OrderDetailController.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md b/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md index fbb4065ec4..b561d79f85 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md @@ -1,10 +1,10 @@ --- Title: displayOrderPreview hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/preview.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/preview.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/preview.html.twig locations: - 'back office' @@ -32,5 +32,5 @@ description: '' ## Call of the Hook in the origin file ```php -{{ renderhook('displayOrderPreview', {'order_id': orderId}) }} +{{ renderhook('displayOrderPreview', {order_id: orderId}) }}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayOverrideTemplate.md b/modules/concepts/hooks/list-of-hooks/displayOverrideTemplate.md index e825f34f99..ee2df71c73 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOverrideTemplate.md +++ b/modules/concepts/hooks/list-of-hooks/displayOverrideTemplate.md @@ -4,11 +4,11 @@ hidden: true hookTitle: 'Change the default template of current controller' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' -type: display +type: action hookAliases: array_return: false check_exceptions: false @@ -42,13 +42,13 @@ Hook::exec( ```php Hook::exec( - 'displayOverrideTemplate', - [ - 'controller' => $this, - 'template_file' => $template, - 'entity' => $params['entity'], - 'id' => $params['id'], - 'locale' => $locale, - ] -) + 'displayOverrideTemplate', + [ + 'controller' => $this, + 'template_file' => $template, + 'entity' => $params['entity'], + 'id' => $params['id'], + 'locale' => $locale, + ] + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayPaymentByBinaries.md b/modules/concepts/hooks/list-of-hooks/displayPaymentByBinaries.md index fe89c0d549..afb1675e7a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayPaymentByBinaries.md +++ b/modules/concepts/hooks/list-of-hooks/displayPaymentByBinaries.md @@ -1,7 +1,7 @@ --- Title: displayPaymentByBinaries hidden: true -hookTitle: Payment form generated by binaries +hookTitle: 'Payment form generated by binaries' files: - theme: classic @@ -29,5 +29,5 @@ description: This hook displays form generated by binaries during the checkout ## Call of the Hook in the origin file ```php -{hook h='displayPaymentByBinaries'} +{hook h='displayPaymentByBinaries'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayPaymentReturn.md b/modules/concepts/hooks/list-of-hooks/displayPaymentReturn.md index 28722cb429..596e28cfac 100644 --- a/modules/concepts/hooks/list-of-hooks/displayPaymentReturn.md +++ b/modules/concepts/hooks/list-of-hooks/displayPaymentReturn.md @@ -4,13 +4,12 @@ hidden: true hookTitle: 'Payment return' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/OrderConfirmationController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/OrderConfirmationController.php' file: controllers/front/OrderConfirmationController.php locations: - 'front office' -type: display -hookAliases: - - paymentReturn +type: action +hookAliases: displayPaymentReturn array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('displayPaymentReturn', ['order' => $order], $this->id_module) +Hook::exec('displayPaymentReturn', ['order' => $order], $this->id_module); ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayPaymentTop.md b/modules/concepts/hooks/list-of-hooks/displayPaymentTop.md index 59ccc221a8..e40ceab7e3 100644 --- a/modules/concepts/hooks/list-of-hooks/displayPaymentTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayPaymentTop.md @@ -1,7 +1,7 @@ --- Title: displayPaymentTop hidden: true -hookTitle: Top of payment page +hookTitle: 'Top of payment page' files: - theme: classic @@ -30,5 +30,5 @@ description: This hook is displayed at the top of the payment page ## Call of the Hook in the origin file ```php -{hook h='displayPaymentTop'} +{hook h='displayPaymentTop'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayPersonalInformationTop.md b/modules/concepts/hooks/list-of-hooks/displayPersonalInformationTop.md index c671339765..3b136d7779 100644 --- a/modules/concepts/hooks/list-of-hooks/displayPersonalInformationTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayPersonalInformationTop.md @@ -1,7 +1,7 @@ --- Title: displayPersonalInformationTop hidden: true -hookTitle: Content in the checkout funnel, on top of the personal information panel +hookTitle: 'Content in the checkout funnel, on top of the personal information panel' files: - theme: classic @@ -29,5 +29,5 @@ description: Display actions or additional content in the personal details tab o ## Call of the Hook in the origin file ```php -{hook h='displayPersonalInformationTop' customer=$customer} +{hook h='displayPersonalInformationTop' customer=$customer}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayProductActions.md b/modules/concepts/hooks/list-of-hooks/displayProductActions.md index e97b254f9d..6eee84504d 100644 --- a/modules/concepts/hooks/list-of-hooks/displayProductActions.md +++ b/modules/concepts/hooks/list-of-hooks/displayProductActions.md @@ -1,7 +1,7 @@ --- Title: displayProductActions hidden: true -hookTitle: Display additional action button on the product page +hookTitle: 'Display additional action button on the product page' files: - theme: classic @@ -29,5 +29,5 @@ description: This hook allow additional actions to be triggered, near the add to ## Call of the Hook in the origin file ```php -{hook h='displayProductActions' product=$product} +{hook h='displayProductActions' product=$product}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayProductAdditionalInfo.md b/modules/concepts/hooks/list-of-hooks/displayProductAdditionalInfo.md index 7e2c21649a..e0284c4f7e 100644 --- a/modules/concepts/hooks/list-of-hooks/displayProductAdditionalInfo.md +++ b/modules/concepts/hooks/list-of-hooks/displayProductAdditionalInfo.md @@ -1,7 +1,7 @@ --- Title: displayProductAdditionalInfo hidden: true -hookTitle: Product page additional info +hookTitle: 'Product page additional info' files: - theme: classic @@ -39,5 +39,5 @@ description: This hook adds additional information on the product page ## Call of the Hook in the origin file ```php -{hook h='displayProductAdditionalInfo' product=$product} +{hook h='displayProductAdditionalInfo' product=$product}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayProductExtraContent.md b/modules/concepts/hooks/list-of-hooks/displayProductExtraContent.md index a8771af992..ac478ba722 100644 --- a/modules/concepts/hooks/list-of-hooks/displayProductExtraContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayProductExtraContent.md @@ -8,10 +8,10 @@ files: url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/catalog/product.tpl#L216' file: 'templates/catalog/product.tml' - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Product/ProductExtraContent.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Product/ProductExtraContent.php' file: 'src/Core/Product/ProductExtraContent.php' - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Product/ProductExtraContentFinder.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Product/ProductExtraContentFinder.php' file: 'src/Core/Product/ProductExtraContentFinder.php' locations: - 'front office' @@ -59,7 +59,7 @@ class ProductExtraContentFinder extends HookFinder protected $expectedInstanceClasses = ['PrestaShop\PrestaShop\Core\Product\ProductExtraContent']; ``` -The `ProductExtraContentFinder` will look for modules hooked into `displayProductExtraContent` with the corresponding existing method, and will expect `ProductExtraContent` to be returned. +The `ProductExtraContentFinder` will look for modules hooked into `displayProductExtraContent` with the corresponding existing method, and will expect `ProductExtraContent` to be returned. ```php return (new PrestaShop\PrestaShop\Core\Product\ProductExtraContent()) diff --git a/modules/concepts/hooks/list-of-hooks/displayProductListReviews.md b/modules/concepts/hooks/list-of-hooks/displayProductListReviews.md index 1b9be378e1..c91bb9aa5e 100644 --- a/modules/concepts/hooks/list-of-hooks/displayProductListReviews.md +++ b/modules/concepts/hooks/list-of-hooks/displayProductListReviews.md @@ -29,5 +29,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayProductListReviews' product=$product} +{hook h='displayProductListReviews' product=$product}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayProductPriceBlock.md b/modules/concepts/hooks/list-of-hooks/displayProductPriceBlock.md index 264214f117..8e2f2636c0 100644 --- a/modules/concepts/hooks/list-of-hooks/displayProductPriceBlock.md +++ b/modules/concepts/hooks/list-of-hooks/displayProductPriceBlock.md @@ -139,5 +139,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayProductPriceBlock' product=$product type="unit_price"} +{hook h='displayProductPriceBlock' product=$product type="unit_price"}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayReassurance.md b/modules/concepts/hooks/list-of-hooks/displayReassurance.md index a73c6590e2..c64932d143 100644 --- a/modules/concepts/hooks/list-of-hooks/displayReassurance.md +++ b/modules/concepts/hooks/list-of-hooks/displayReassurance.md @@ -45,5 +45,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayReassurance'} +{hook h='displayReassurance'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayRightColumn.md b/modules/concepts/hooks/list-of-hooks/displayRightColumn.md index 2b1a325307..7659d80928 100644 --- a/modules/concepts/hooks/list-of-hooks/displayRightColumn.md +++ b/modules/concepts/hooks/list-of-hooks/displayRightColumn.md @@ -25,5 +25,5 @@ description: 'This hook displays new elements in the right-hand column of a page ## Call of the Hook in the origin file ```php -{hook h='displayRightColumn'} +{hook h='displayRightColumn'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayRightColumnProduct.md b/modules/concepts/hooks/list-of-hooks/displayRightColumnProduct.md index 1e4c962a09..179782934a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayRightColumnProduct.md +++ b/modules/concepts/hooks/list-of-hooks/displayRightColumnProduct.md @@ -1,7 +1,7 @@ --- Title: displayRightColumnProduct hidden: true -hookTitle: New elements on the product page (right column) +hookTitle: 'New elements on the product page (right column)' files: - theme: classic @@ -34,5 +34,5 @@ description: This hook displays new elements in the right-hand column of the pro ## Call of the Hook in the origin file ```php -{hook h='displayRightColumnProduct'} +{hook h='displayRightColumnProduct'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displaySearch.md b/modules/concepts/hooks/list-of-hooks/displaySearch.md index 8dc2b5ae4b..5d0c74ff0e 100644 --- a/modules/concepts/hooks/list-of-hooks/displaySearch.md +++ b/modules/concepts/hooks/list-of-hooks/displaySearch.md @@ -24,5 +24,5 @@ description: '' ## Call of the Hook in the origin file ```php -{hook h='displaySearch'} +{hook h='displaySearch'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayShoppingCart.md b/modules/concepts/hooks/list-of-hooks/displayShoppingCart.md index f506942cb3..2eaa74503e 100644 --- a/modules/concepts/hooks/list-of-hooks/displayShoppingCart.md +++ b/modules/concepts/hooks/list-of-hooks/displayShoppingCart.md @@ -1,7 +1,7 @@ --- Title: displayShoppingCart hidden: true -hookTitle: Shopping cart - Additional button +hookTitle: 'Shopping cart - Additional button' files: - theme: classic @@ -30,5 +30,5 @@ description: This hook displays new action buttons within the shopping cart ## Call of the Hook in the origin file ```php -{hook h='displayShoppingCart'} +{hook h='displayShoppingCart'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayShoppingCartFooter.md b/modules/concepts/hooks/list-of-hooks/displayShoppingCartFooter.md index 0f3515c2d5..207f3286cf 100644 --- a/modules/concepts/hooks/list-of-hooks/displayShoppingCartFooter.md +++ b/modules/concepts/hooks/list-of-hooks/displayShoppingCartFooter.md @@ -1,7 +1,7 @@ --- Title: displayShoppingCartFooter hidden: true -hookTitle: Shopping cart footer +hookTitle: 'Shopping cart footer' files: - theme: classic @@ -30,5 +30,5 @@ description: This hook displays some specific information on the shopping cart's ## Call of the Hook in the origin file ```php -{hook h='displayShoppingCartFooter'} +{hook h='displayShoppingCartFooter'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayTop.md b/modules/concepts/hooks/list-of-hooks/displayTop.md index 66291bedf0..c679f8b793 100644 --- a/modules/concepts/hooks/list-of-hooks/displayTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayTop.md @@ -1,7 +1,7 @@ --- Title: displayTop hidden: true -hookTitle: Top of pages +hookTitle: 'Top of pages' files: - theme: classic @@ -34,5 +34,5 @@ description: This hook displays additional elements at the top of your pages ## Call of the Hook in the origin file ```php -{hook h='displayTop'} +{hook h='displayTop'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayWrapperBottom.md b/modules/concepts/hooks/list-of-hooks/displayWrapperBottom.md index 404e4dcfe8..e75a4e25c9 100644 --- a/modules/concepts/hooks/list-of-hooks/displayWrapperBottom.md +++ b/modules/concepts/hooks/list-of-hooks/displayWrapperBottom.md @@ -28,5 +28,5 @@ description: 'This hook displays new elements in the bottom of the main wrapper' ## Call of the Hook in the origin file ```php -{hook h='displayWrapperBottom'} +{hook h='displayWrapperBottom'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayWrapperTop.md b/modules/concepts/hooks/list-of-hooks/displayWrapperTop.md index 62c10e5c73..dbf6af8bb3 100644 --- a/modules/concepts/hooks/list-of-hooks/displayWrapperTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayWrapperTop.md @@ -28,5 +28,5 @@ description: 'This hook displays new elements in the top of the main wrapper' ## Call of the Hook in the origin file ```php -{hook h='displayWrapperTop'} +{hook h='displayWrapperTop'}; ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterCategoryContent.md b/modules/concepts/hooks/list-of-hooks/filterCategoryContent.md index 053d72e257..40d7696826 100644 --- a/modules/concepts/hooks/list-of-hooks/filterCategoryContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterCategoryContent.md @@ -4,15 +4,15 @@ hidden: true hookTitle: 'Filter the content page category' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/listing/CategoryController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/listing/CategoryController.php' file: controllers/front/listing/CategoryController.php locations: - 'front office' -type: null +type: action hookAliases: -array_return: false -check_exceptions: false -chain: true +array_return: $array_return = false +check_exceptions: $check_exceptions = true +chain: $chain = true origin: core description: 'This hook is called just before fetching content page category' @@ -41,5 +41,5 @@ Hook::exec( $use_push = false, $id_shop = null, $chain = true - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterCmsCategoryContent.md b/modules/concepts/hooks/list-of-hooks/filterCmsCategoryContent.md index 8f840506aa..483225fd41 100644 --- a/modules/concepts/hooks/list-of-hooks/filterCmsCategoryContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterCmsCategoryContent.md @@ -4,14 +4,14 @@ hidden: true hookTitle: 'Filter the content page category' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/CmsController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/CmsController.php' file: controllers/front/CmsController.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false -check_exceptions: false +check_exceptions: true chain: true origin: core description: 'This hook is called just before fetching content page category' @@ -26,11 +26,11 @@ description: 'This hook is called just before fetching content page category' Hook::exec( 'filterCmsCategoryContent', ['object' => $cmsCategoryVar], - $id_module = null, - $array_return = false, - $check_exceptions = true, - $use_push = false, - $id_shop = null, - $chain = true - ) + null, + false, + true, + false, + null, + true + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterCmsContent.md b/modules/concepts/hooks/list-of-hooks/filterCmsContent.md index b953ba3bab..d068204671 100644 --- a/modules/concepts/hooks/list-of-hooks/filterCmsContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterCmsContent.md @@ -4,14 +4,14 @@ hidden: true hookTitle: 'Filter the content page' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/CmsController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/CmsController.php' file: controllers/front/CmsController.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false -check_exceptions: false +check_exceptions: true chain: true origin: core description: 'This hook is called just before fetching content page' @@ -26,11 +26,11 @@ description: 'This hook is called just before fetching content page' Hook::exec( 'filterCmsContent', ['object' => $cmsVar], - $id_module = null, - $array_return = false, - $check_exceptions = true, - $use_push = false, - $id_shop = null, - $chain = true - ) + null, + false, + true, + false, + null, + true + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterHtmlContent.md b/modules/concepts/hooks/list-of-hooks/filterHtmlContent.md index bde4419f40..be57fdc4ff 100644 --- a/modules/concepts/hooks/list-of-hooks/filterHtmlContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterHtmlContent.md @@ -4,14 +4,14 @@ hidden: true hookTitle: 'Filter HTML field before rending a page' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Object/ObjectPresenter.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Object/ObjectPresenter.php' file: src/Adapter/Presenter/Object/ObjectPresenter.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false -check_exceptions: false +check_exceptions: true chain: true origin: core description: 'This hook is called just before fetching a page on HTML field' @@ -36,5 +36,5 @@ Hook::exec( false, null, true - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterManufacturerContent.md b/modules/concepts/hooks/list-of-hooks/filterManufacturerContent.md index 7e97cfaf41..2463989eb1 100644 --- a/modules/concepts/hooks/list-of-hooks/filterManufacturerContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterManufacturerContent.md @@ -4,15 +4,15 @@ hidden: true hookTitle: 'Filter the content page manufacturer' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/listing/ManufacturerController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/listing/ManufacturerController.php' file: controllers/front/listing/ManufacturerController.php locations: - 'front office' -type: null +type: action hookAliases: -array_return: false -check_exceptions: false -chain: true +array_return: $array_return = false +check_exceptions: $check_exceptions = true +chain: $chain = true origin: core description: 'This hook is called just before fetching content page manufacturer' @@ -24,13 +24,13 @@ description: 'This hook is called just before fetching content page manufacturer ```php Hook::exec( - 'filterManufacturerContent', - ['filtered_content' => $manufacturerVar['description']], - $id_module = null, - $array_return = false, - $check_exceptions = true, - $use_push = false, - $id_shop = null, - $chain = true - ) + 'filterManufacturerContent', + ['object' => $manufacturer], + $id_module = null, + $array_return = false, + $check_exceptions = true, + $use_push = false, + $id_shop = null, + $chain = true + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterProductContent.md b/modules/concepts/hooks/list-of-hooks/filterProductContent.md index 2c3899bb14..9135836ff7 100644 --- a/modules/concepts/hooks/list-of-hooks/filterProductContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterProductContent.md @@ -4,14 +4,14 @@ hidden: true hookTitle: 'Filter the content page product' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/ProductController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/ProductController.php' file: controllers/front/ProductController.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false -check_exceptions: false +check_exceptions: true chain: true origin: core description: 'This hook is called just before fetching content page product' @@ -24,13 +24,13 @@ description: 'This hook is called just before fetching content page product' ```php Hook::exec( - 'filterProductContent', - ['object' => $product_for_template], - null, - false, - true, - false, - null, - true - ) + 'filterProductContent', + ['object' => $product_for_template], + null, + false, + true, + false, + null, + true + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterProductSearch.md b/modules/concepts/hooks/list-of-hooks/filterProductSearch.md index 154c3cdef7..2f31f33d0f 100644 --- a/modules/concepts/hooks/list-of-hooks/filterProductSearch.md +++ b/modules/concepts/hooks/list-of-hooks/filterProductSearch.md @@ -4,11 +4,11 @@ hidden: true hookTitle: 'Filter search products result' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/modules/blockwishlist/controllers/front/view.php' - file: modules/blockwishlist/controllers/front/view.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/ProductListingFrontController.php' + file: classes/controller/ProductListingFrontController.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false check_exceptions: false @@ -23,5 +23,5 @@ description: 'This hook is called in order to allow to modify search product res ## Call of the Hook in the origin file ```php -Hook::exec('filterProductSearch', ['searchVariables' => &$searchVariables]) +Hook::exec('filterProductSearch', ['searchVariables' => &$searchVariables]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterSupplierContent.md b/modules/concepts/hooks/list-of-hooks/filterSupplierContent.md index 24a4be8656..710e33b452 100644 --- a/modules/concepts/hooks/list-of-hooks/filterSupplierContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterSupplierContent.md @@ -4,14 +4,14 @@ hidden: true hookTitle: 'Filter the content page supplier' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/controllers/front/listing/SupplierController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/listing/SupplierController.php' file: controllers/front/listing/SupplierController.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false -check_exceptions: false +check_exceptions: true chain: true origin: core description: 'This hook is called just before fetching content page supplier' @@ -24,13 +24,13 @@ description: 'This hook is called just before fetching content page supplier' ```php Hook::exec( - 'filterSupplierContent', - ['object' => $supplierVar], - $id_module = null, - $array_return = false, - $check_exceptions = true, - $use_push = false, - $id_shop = null, - $chain = true - ) + 'filterSupplierContent', + ['object' => $supplier], + null, + false, + true, + false, + null, + true + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/gSitemapAppendUrls.md b/modules/concepts/hooks/list-of-hooks/gSitemapAppendUrls.md index fe8b30aa24..1fbf70db35 100644 --- a/modules/concepts/hooks/list-of-hooks/gSitemapAppendUrls.md +++ b/modules/concepts/hooks/list-of-hooks/gSitemapAppendUrls.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/modules/gsitemap/gsitemap.php' + url: 'https://github.com/PrestaShop/gsitemap/blob/master/gsitemap.php' file: modules/gsitemap/gsitemap.php locations: - 'front office' diff --git a/modules/concepts/hooks/list-of-hooks/legacyblockkpi.md b/modules/concepts/hooks/list-of-hooks/legacyblockkpi.md index a0a22b4615..6b26f7c6db 100644 --- a/modules/concepts/hooks/list-of-hooks/legacyblockkpi.md +++ b/modules/concepts/hooks/list-of-hooks/legacyblockkpi.md @@ -4,7 +4,7 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/catalog.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/8.2.x/src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/catalog.html.twig' file: src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/catalog.html.twig locations: - 'back office' diff --git a/modules/concepts/hooks/list-of-hooks/moduleRoutes.md b/modules/concepts/hooks/list-of-hooks/moduleRoutes.md index b9f46f2705..f1b6bccc99 100644 --- a/modules/concepts/hooks/list-of-hooks/moduleRoutes.md +++ b/modules/concepts/hooks/list-of-hooks/moduleRoutes.md @@ -1,14 +1,14 @@ --- Title: moduleRoutes hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Dispatcher.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Dispatcher.php' file: classes/Dispatcher.php locations: - 'front office' -type: null +type: action hookAliases: hasExample: true array_return: true @@ -24,7 +24,7 @@ description: 'This hook allows your module to extend default PrestaShop routes w ## Call of the Hook in the origin file ```php -Hook::exec('moduleRoutes', ['id_shop' => $id_shop], null, true, false) +Hook::exec('moduleRoutes', ['id_shop' => $id_shop], null, true, false); ``` ## Example implementation @@ -177,5 +177,4 @@ class MyModuleAddingRoutes extends Module } ``` -The complete implementation example is available in our [example modules repository](https://github.com/PrestaShop/example-modules/tree/master/demomoduleroutes). - +The complete implementation example is available in our [example modules repository](https://github.com/PrestaShop/example-modules/tree/master/demomoduleroutes). \ No newline at end of file diff --git a/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md b/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md index 3ae912cbae..eb297532d8 100644 --- a/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md +++ b/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md @@ -1,14 +1,14 @@ --- Title: overrideLayoutTemplate hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/FrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' file: classes/controller/FrontController.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false check_exceptions: false @@ -32,5 +32,5 @@ Hook::exec( 'controller' => $this, 'content_only' => $content_only, ] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/overrideMinimalPurchasePrice.md b/modules/concepts/hooks/list-of-hooks/overrideMinimalPurchasePrice.md index 928319b726..7fddd80d96 100644 --- a/modules/concepts/hooks/list-of-hooks/overrideMinimalPurchasePrice.md +++ b/modules/concepts/hooks/list-of-hooks/overrideMinimalPurchasePrice.md @@ -1,14 +1,14 @@ --- Title: overrideMinimalPurchasePrice hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Adapter/Presenter/Cart/CartPresenter.php' - file: src/Adapter/Presenter/Cart/CartPresenter.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Cart/CartLazyArray.php' + file: src/Adapter/Presenter/Cart/CartLazyArray.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false check_exceptions: false @@ -25,5 +25,5 @@ description: '' ```php Hook::exec('overrideMinimalPurchasePrice', [ 'minimalPurchase' => &$minimalPurchase, - ]) + ]); ``` diff --git a/modules/concepts/hooks/list-of-hooks/productSearchProvider.md b/modules/concepts/hooks/list-of-hooks/productSearchProvider.md index 3a56e86acb..d8b293c966 100644 --- a/modules/concepts/hooks/list-of-hooks/productSearchProvider.md +++ b/modules/concepts/hooks/list-of-hooks/productSearchProvider.md @@ -1,14 +1,14 @@ --- Title: productSearchProvider hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/controller/ProductListingFrontController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/ProductListingFrontController.php' file: classes/controller/ProductListingFrontController.php locations: - 'front office' -type: null +type: action hookAliases: array_return: true check_exceptions: false @@ -28,5 +28,5 @@ Hook::exec( ['query' => $query], null, true - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/sendMailAlterTemplateVars.md b/modules/concepts/hooks/list-of-hooks/sendMailAlterTemplateVars.md index 9816d135b1..e647187d28 100644 --- a/modules/concepts/hooks/list-of-hooks/sendMailAlterTemplateVars.md +++ b/modules/concepts/hooks/list-of-hooks/sendMailAlterTemplateVars.md @@ -4,11 +4,11 @@ hidden: true hookTitle: 'Alter template vars on the fly' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Mail.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Mail.php' file: classes/Mail.php locations: - 'front office' -type: null +type: action hookAliases: array_return: false check_exceptions: false @@ -29,5 +29,5 @@ Hook::exec( 'template' => $template, 'template_vars' => &$templateVars, ] - ) + ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/termsAndConditions.md b/modules/concepts/hooks/list-of-hooks/termsAndConditions.md index c4c95829e5..980e0edcbe 100644 --- a/modules/concepts/hooks/list-of-hooks/termsAndConditions.md +++ b/modules/concepts/hooks/list-of-hooks/termsAndConditions.md @@ -1,14 +1,14 @@ --- Title: termsAndConditions hidden: true -hookTitle: +hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/checkout/ConditionsToApproveFinder.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/ConditionsToApproveFinder.php' file: classes/checkout/ConditionsToApproveFinder.php locations: - 'front office' -type: null +type: action hookAliases: array_return: true check_exceptions: false @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('termsAndConditions', [], null, true) +Hook::exec('termsAndConditions', [], null, true); ``` diff --git a/modules/concepts/hooks/list-of-hooks/validateCustomerFormFields.md b/modules/concepts/hooks/list-of-hooks/validateCustomerFormFields.md index abf5091338..4325280087 100644 --- a/modules/concepts/hooks/list-of-hooks/validateCustomerFormFields.md +++ b/modules/concepts/hooks/list-of-hooks/validateCustomerFormFields.md @@ -4,11 +4,11 @@ hidden: true hookTitle: 'Customer registration form validation' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/form/CustomerForm.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerForm.php' file: classes/form/CustomerForm.php locations: - 'front office' -type: null +type: action hookAliases: array_return: true check_exceptions: false @@ -23,5 +23,5 @@ description: 'This hook is called to a module when it has sent additional fields ## Call of the Hook in the origin file ```php -Hook::exec('validateCustomerFormFields', ['fields' => $formFields], $moduleId, true) +Hook::exec('validateCustomerFormFields', ['fields' => $formFields], $moduleId, true); ```