From e6fc78868ab547cdfe16803a25d8bc6652336701 Mon Sep 17 00:00:00 2001 From: MadMax Date: Mon, 13 Apr 2026 14:15:23 +0300 Subject: [PATCH 1/4] 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 +- .../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 +- 338 files changed, 984 insertions(+), 1053 deletions(-) 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/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); ``` From 31f8da4fff609ce60d9ed3cdd9b7aada1c51b428 Mon Sep 17 00:00:00 2001 From: MadMax Date: Fri, 22 May 2026 21:07:49 +0300 Subject: [PATCH 2/4] Fix hook metadata regressions from review feedback. Restore hook aliases and types from PrestaShop 9.1.x sources, update origin files and call snippets from core/theme code, and add multi-file hook placements where needed. Co-authored-by: Cursor --- ...acyControllerName>ListingFieldsModifier.md | 2 +- ...cyControllerName>ListingResultsModifier.md | 2 +- ...rametersMetaControllerPostProcessBefore.md | 7 +- ...inWebserviceControllerPostProcessBefore.md | 7 +- ...ministrationControllerPostProcessBefore.md | 7 +- ...ceControllerPostProcessBefore.md | 2 +- ...sPerformanceControllerPostProcessBefore.md | 7 +- .../actionAdminBreadcrumbModifier.md | 5 +- .../actionAdminControllerInitAfter.md | 4 +- .../actionAdminControllerInitBefore.md | 4 +- .../actionAdminControllerSetMedia.md | 7 +- .../actionAdminDuplicateAfter.md | 8 +- .../actionAdminDuplicateBefore.md | 7 +- ...onControllerPostProcessBefore.md | 2 +- ...lGeolocationControllerPostProcessBefore.md | 7 +- ...onControllerPostProcessBefore.md | 2 +- ...LocalizationControllerPostProcessBefore.md | 7 +- .../actionAdminLoginControllerSetMedia.md | 4 +- ...ionAdminLogsControllerPostProcessBefore.md | 7 +- ...nMaintenanceControllerPostProcessBefore.md | 7 +- .../actionAdminMenuTabsModifier.md | 2 +- .../actionAdminMetaAfterWriteRobotsFile.md | 7 +- .../actionAdminMetaBeforeWriteRobotsFile.md | 6 +- .../list-of-hooks/actionAdminMetaSave.md | 5 +- .../actionAdminOrdersTrackingNumberUpdate.md | 6 +- ...nPreferencesControllerPostProcessBefore.md | 7 +- ...ctionAdminProductsListingFieldsModifier.md | 14 +-- ...tionAdminProductsListingResultsModifier.md | 10 +- ...dminSecurityControllerPostProcessBefore.md | 7 +- ...gPreferencesControllerPostProcessBefore.md | 8 +- ...ntrollerPostProcessCarrierOptionsBefore.md | 8 +- ...ncesControllerPostProcessHandlingBefore.md | 8 +- ...taControllerPostProcessBefore.md | 2 +- ...esControllerPostProcessBefore.md | 2 +- ...rPreferencesControllerPostProcessBefore.md | 7 +- ...esControllerPostProcessBefore.md | 2 +- ...tPreferencesControllerPostProcessBefore.md | 7 +- ...dminThemesControllerUpdate_optionsAfter.md | 2 +- .../actionAttributeCombinationDelete.md | 4 +- .../actionAttributeCombinationSave.md | 10 +- .../list-of-hooks/actionAttributeDelete.md | 5 +- .../actionAttributeGroupDelete.md | 5 +- .../list-of-hooks/actionAttributeGroupSave.md | 5 +- .../list-of-hooks/actionAttributeSave.md | 5 +- .../list-of-hooks/actionAuthentication.md | 5 +- .../actionAuthenticationBefore.md | 5 +- ...actionBeforeAjaxDie.md | 2 +- .../actionBuildFrontEndObject.md | 4 +- .../actionBuildMailLayoutVariables.md | 17 ++- .../list-of-hooks/actionCarrierProcess.md | 5 +- .../list-of-hooks/actionCarrierUpdate.md | 14 ++- .../actionCartGetPackageShippingCost.md | 9 +- .../hooks/list-of-hooks/actionCartSave.md | 5 +- .../hooks/list-of-hooks/actionCartSummary.md | 4 +- .../actionCartUpdateQuantityBefore.md | 5 +- .../hooks/list-of-hooks/actionCategoryAdd.md | 5 +- .../list-of-hooks/actionCategoryDelete.md | 5 +- .../list-of-hooks/actionCategoryUpdate.md | 5 +- .../list-of-hooks/actionCheckoutRender.md | 2 +- .../hooks/list-of-hooks/actionClearCache.md | 2 +- .../list-of-hooks/actionClearCompileCache.md | 2 +- .../list-of-hooks/actionClearSf2Cache.md | 5 +- .../actionControllerInitAfter.md | 4 +- .../actionControllerInitBefore.md | 3 +- .../list-of-hooks/actionCustomerAccountAdd.md | 7 +- .../actionCustomerAccountUpdate.md | 4 +- .../list-of-hooks/actionCustomerAddGroups.md | 4 +- .../actionCustomerBeforeUpdateGroup.md | 4 +- .../actionCustomerLogoutAfter.md | 2 +- .../actionCustomerLogoutBefore.md | 2 +- .../list-of-hooks/actionDeleteGDPRCustomer.md | 4 +- .../actionDeliveryPriceByPrice.md | 4 +- .../actionDeliveryPriceByWeight.md | 4 +- .../hooks/list-of-hooks/actionDispatcher.md | 7 +- .../list-of-hooks/actionDispatcherAfter.md | 8 +- .../list-of-hooks/actionDispatcherBefore.md | 8 +- .../list-of-hooks/actionDownloadAttachment.md | 4 +- .../actionEmailAddAfterContent.md | 7 +- .../actionEmailAddBeforeContent.md | 7 +- .../list-of-hooks/actionEmailSendBefore.md | 19 +-- .../list-of-hooks/actionExportGDPRData.md | 7 +- .../list-of-hooks/actionFeatureDelete.md | 5 +- .../hooks/list-of-hooks/actionFeatureSave.md | 5 +- .../list-of-hooks/actionFeatureValueDelete.md | 5 +- .../list-of-hooks/actionFeatureValueSave.md | 5 +- .../actionFilterDeliveryOptionList.md | 3 +- ...rontControllerDetectContextCountryAfter.md | 3 +- .../actionFrontControllerInitAfter.md | 10 +- .../actionFrontControllerInitBefore.md | 7 +- ...FrontControllerInitContextCurrencyAfter.md | 3 +- .../actionFrontControllerSetMedia.md | 4 +- .../actionFrontControllerSetVariables.md | 4 +- ...actionFrontControllerSetVariablesBefore.md | 3 +- .../actionGenerateDocumentReference.md | 4 +- .../actionGetAdminOrderButtons.md | 4 +- .../actionGetAdminToolbarButtons.md | 5 +- .../actionGetAlternativeSearchPanels.md | 5 +- .../actionGetExtraMailTemplateVars.md | 9 +- .../actionGetIDZoneByAddressID.md | 4 +- .../actionGetProductPropertiesAfter.md | 16 ++- ...ctionGetProductPropertiesAfterUnitPrice.md | 6 +- .../actionGetProductPropertiesBefore.md | 8 +- .../list-of-hooks/actionHtaccessCreate.md | 5 +- .../actionInvoiceNumberFormatted.md | 9 +- .../actionLanguageLinkParameters.md | 6 +- .../list-of-hooks/actionLoggerLogMessage.md | 4 +- .../actionMailAlterMessageBeforeSend.md | 4 +- .../actionModifyFrontendSitemap.md | 16 +-- .../list-of-hooks/actionModuleInstallAfter.md | 2 +- .../actionModuleInstallBefore.md | 2 +- .../actionModuleMailAlertSendCustomer.md | 18 +-- .../actionModuleRegisterHookAfter.md | 7 +- .../actionModuleRegisterHookBefore.md | 7 +- .../actionModuleUnRegisterHookAfter.md | 7 +- .../actionModuleUnRegisterHookBefore.md | 7 +- .../actionModuleUninstallAfter.md | 2 +- .../actionModuleUninstallBefore.md | 2 +- .../actionNewsletterRegistrationAfter.md | 2 +- .../actionNewsletterRegistrationBefore.md | 2 +- .../list-of-hooks/actionObjectAddAfter.md | 4 +- .../list-of-hooks/actionObjectAddBefore.md | 4 +- .../list-of-hooks/actionObjectDeleteAfter.md | 4 +- .../list-of-hooks/actionObjectDeleteBefore.md | 4 +- ...actionObjectProductCommentValidateAfter.md | 2 +- .../actionObjectProductInCartDeleteAfter.md | 2 +- .../actionObjectProductInCartDeleteBefore.md | 2 +- .../list-of-hooks/actionObjectUpdateAfter.md | 4 +- .../list-of-hooks/actionObjectUpdateBefore.md | 4 +- .../list-of-hooks/actionOnImageCutAfter.md | 4 +- .../list-of-hooks/actionOnImageResizeAfter.md | 4 +- .../hooks/list-of-hooks/actionOrderEdited.md | 8 +- .../actionOrderHistoryAddAfter.md | 4 +- .../hooks/list-of-hooks/actionOrderReturn.md | 5 +- .../hooks/list-of-hooks/actionOrderSlipAdd.md | 10 +- .../actionOrderStatusPostUpdate.md | 9 +- .../list-of-hooks/actionOrderStatusUpdate.md | 9 +- .../list-of-hooks/actionOutputHTMLBefore.md | 2 +- .../actionOverrideEmployeeImage.md | 3 +- .../actionOverrideShippingFreePrice.md | 2 +- .../actionOverrideShippingFreeWeight.md | 2 +- .../list-of-hooks/actionPDFInvoiceRender.md | 17 ++- .../list-of-hooks/actionPasswordRenew.md | 4 +- .../hooks/list-of-hooks/actionPaymentCCAdd.md | 5 +- .../actionPaymentConfirmation.md | 5 +- .../hooks/list-of-hooks/actionPresentCart.md | 4 +- .../list-of-hooks/actionPresentCategory.md | 4 +- .../actionPresentManufacturer.md | 4 +- .../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 | 7 +- .../hooks/list-of-hooks/actionPresentStore.md | 4 +- .../list-of-hooks/actionPresentSupplier.md | 4 +- .../hooks/list-of-hooks/actionProductAdd.md | 8 +- .../actionProductAttributeDelete.md | 5 +- .../actionProductAttributeUpdate.md | 5 +- .../list-of-hooks/actionProductCancel.md | 14 ++- .../list-of-hooks/actionProductCoverage.md | 6 +- .../list-of-hooks/actionProductDelete.md | 5 +- .../list-of-hooks/actionProductOutOfStock.md | 5 +- .../actionProductPriceCalculation.md | 28 +---- .../hooks/list-of-hooks/actionProductSave.md | 5 +- .../list-of-hooks/actionProductSearchAfter.md | 7 +- ...ctionProductSearchProviderRunQueryAfter.md | 5 +- ...tionProductSearchProviderRunQueryBefore.md | 4 +- .../list-of-hooks/actionProductUpdate.md | 8 +- .../hooks/list-of-hooks/actionSearch.md | 10 +- .../hooks/list-of-hooks/actionSetInvoice.md | 8 +- .../actionShopDataDuplication.md | 10 +- .../actionSubmitAccountBefore.md | 8 +- .../actionSubmitCustomerAddressForm.md | 4 +- .../list-of-hooks/actionUpdateCartAddress.md | 2 +- .../list-of-hooks/actionUpdateLangAfter.md | 2 +- .../list-of-hooks/actionUpdateQuantity.md | 24 ++-- .../list-of-hooks/actionValidateCartRule.md | 9 +- .../actionValidateCustomerAddressForm.md | 2 +- .../list-of-hooks/actionValidateOrder.md | 8 +- .../list-of-hooks/actionValidateOrderAfter.md | 7 +- .../actionValidateOrderBefore.md | 8 +- .../actionValidateStepComplete.md | 7 +- .../hooks/list-of-hooks/actionWatermark.md | 20 +-- .../list-of-hooks/actionWishlistAddProduct.md | 4 +- .../list-of-hooks/addWebserviceResources.md | 2 +- .../additionalCustomerAddressFields.md | 6 +- .../additionalCustomerFormFields.md | 2 +- .../hooks/list-of-hooks/dashboardData.md | 9 +- .../hooks/list-of-hooks/dashboardZoneOne.md | 9 +- .../hooks/list-of-hooks/dashboardZoneThree.md | 2 +- .../hooks/list-of-hooks/dashboardZoneTwo.md | 9 +- .../list-of-hooks/deleteProductAttribute.md | 8 +- .../displayAdditionalCustomerAddressFields.md | 11 +- .../displayAddressSelectorBottom.md | 12 +- .../list-of-hooks/displayAdminAfterHeader.md | 16 ++- .../list-of-hooks/displayAdminCustomers.md | 7 +- .../list-of-hooks/displayAdminEndContent.md | 14 ++- .../hooks/list-of-hooks/displayAdminForm.md | 4 +- .../displayAdminGridTableAfter.md | 4 +- .../displayAdminGridTableBefore.md | 4 +- .../list-of-hooks/displayAdminListAfter.md | 12 +- .../list-of-hooks/displayAdminListBefore.md | 9 +- .../hooks/list-of-hooks/displayAdminLogin.md | 10 +- .../displayAdminNavBarBeforeEnd.md | 13 +- .../list-of-hooks/displayAdminOptions.md | 4 +- .../hooks/list-of-hooks/displayAdminOrder.md | 11 +- .../displayAdminOrderCreateExtraButtons.md | 7 +- .../list-of-hooks/displayAdminOrderMain.md | 6 +- .../displayAdminOrderMainBottom.md | 7 +- .../list-of-hooks/displayAdminOrderSide.md | 9 +- .../displayAdminOrderSideBottom.md | 9 +- .../list-of-hooks/displayAdminStatsModules.md | 12 +- .../displayAdminThemesListAfter.md | 6 +- .../hooks/list-of-hooks/displayAdminView.md | 4 +- .../displayAfterBodyOpeningTag.md | 11 +- .../list-of-hooks/displayAfterCarrier.md | 4 +- .../displayAfterProductThumbs.md | 3 +- .../list-of-hooks/displayAfterTitleTag.md | 11 +- .../displayBackOfficeEmployeeMenu.md | 16 +-- .../list-of-hooks/displayBackOfficeFooter.md | 17 ++- .../list-of-hooks/displayBackOfficeHeader.md | 21 +++- .../list-of-hooks/displayBackOfficeTop.md | 11 +- .../hooks/list-of-hooks/displayBanner.md | 11 +- .../displayBeforeBodyClosingTag.md | 11 +- .../list-of-hooks/displayBeforeCarrier.md | 7 +- .../displayCMSDisputeInformation.md | 13 +- .../list-of-hooks/displayCMSPrintButton.md | 13 +- .../displayCarrierExtraContent.md | 7 +- .../displayCartExtraProductActions.md | 5 +- .../list-of-hooks/displayCartModalContent.md | 2 +- .../list-of-hooks/displayCartModalFooter.md | 2 +- .../displayCheckoutBeforeConfirmation.md | 11 +- .../displayCheckoutSubtotalDetails.md | 19 +-- .../displayCheckoutSummaryTop.md | 11 +- .../list-of-hooks/displayContactContent.md | 11 +- .../list-of-hooks/displayContactLeftColumn.md | 11 +- .../displayContactRightColumn.md | 11 +- .../displayContentWrapperBottom.md | 58 ++++++--- .../list-of-hooks/displayContentWrapperTop.md | 58 ++++++--- .../displayCrossSellingShoppingCart.md | 13 +- .../list-of-hooks/displayCustomerAccount.md | 11 +- .../displayCustomerAccountForm.md | 7 +- .../displayCustomerAccountFormTop.md | 7 +- .../displayCustomerLoginFormAfter.md | 11 +- .../list-of-hooks/displayCustomization.md | 6 +- .../displayDashboardToolbarIcons.md | 11 +- .../displayDashboardToolbarTopMenu.md | 14 ++- .../list-of-hooks/displayDashboardTop.md | 14 ++- .../displayEmptyModuleCategoryExtraMessage.md | 7 +- .../list-of-hooks/displayExpressCheckout.md | 13 +- .../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 | 11 +- .../hooks/list-of-hooks/displayFooterAfter.md | 13 +- .../list-of-hooks/displayFooterBefore.md | 13 +- .../list-of-hooks/displayFooterCategory.md | 12 +- .../list-of-hooks/displayFooterProduct.md | 11 +- .../hooks/list-of-hooks/displayGDPRConsent.md | 2 +- .../hooks/list-of-hooks/displayHeader.md | 15 ++- .../list-of-hooks/displayHeaderCategory.md | 12 +- .../hooks/list-of-hooks/displayHome.md | 7 +- .../displayInvoiceLegalFreeText.md | 2 +- .../hooks/list-of-hooks/displayLeftColumn.md | 18 ++- .../list-of-hooks/displayLeftColumnProduct.md | 11 +- .../hooks/list-of-hooks/displayMaintenance.md | 4 +- .../displayModuleConfigureExtraButtons.md | 2 +- .../list-of-hooks/displayMyAccountBlock.md | 7 +- .../hooks/list-of-hooks/displayNav1.md | 11 +- .../hooks/list-of-hooks/displayNav2.md | 11 +- .../list-of-hooks/displayNavFullWidth.md | 11 +- .../displayNewsletterRegistration.md | 2 +- .../hooks/list-of-hooks/displayNotFound.md | 11 +- .../list-of-hooks/displayOrderConfirmation.md | 7 +- .../displayOrderConfirmation1.md | 11 +- .../displayOrderConfirmation2.md | 11 +- .../hooks/list-of-hooks/displayOrderDetail.md | 9 +- .../list-of-hooks/displayOrderPreview.md | 5 +- .../list-of-hooks/displayOverrideTemplate.md | 2 +- .../list-of-hooks/displayPaymentByBinaries.md | 3 +- .../list-of-hooks/displayPaymentReturn.md | 7 +- .../hooks/list-of-hooks/displayPaymentTop.md | 3 +- .../displayPersonalInformationTop.md | 3 +- .../list-of-hooks/displayProductActions.md | 5 +- .../displayProductAdditionalInfo.md | 15 +-- .../displayProductExtraContent.md | 17 ++- .../displayProductListReviews.md | 11 +- .../list-of-hooks/displayProductPriceBlock.md | 117 ++++-------------- .../hooks/list-of-hooks/displayReassurance.md | 19 ++- .../hooks/list-of-hooks/displayRightColumn.md | 18 ++- .../displayRightColumnProduct.md | 11 +- .../hooks/list-of-hooks/displaySearch.md | 8 +- .../list-of-hooks/displayShoppingCart.md | 11 +- .../displayShoppingCartFooter.md | 11 +- .../hooks/list-of-hooks/displayTop.md | 11 +- .../list-of-hooks/displayWrapperBottom.md | 16 +-- .../hooks/list-of-hooks/displayWrapperTop.md | 16 +-- .../list-of-hooks/filterCategoryContent.md | 6 +- .../list-of-hooks/filterCmsCategoryContent.md | 6 +- .../hooks/list-of-hooks/filterCmsContent.md | 6 +- .../hooks/list-of-hooks/filterHtmlContent.md | 10 +- .../filterManufacturerContent.md | 16 +-- .../list-of-hooks/filterProductContent.md | 6 +- .../list-of-hooks/filterProductSearch.md | 2 +- .../list-of-hooks/filterSupplierContent.md | 16 +-- .../hooks/list-of-hooks/gSitemapAppendUrls.md | 2 +- .../hooks/list-of-hooks/legacyblockkpi.md | 2 +- .../hooks/list-of-hooks/moduleRoutes.md | 4 +- .../list-of-hooks/overrideLayoutTemplate.md | 8 +- .../overrideMinimalPurchasePrice.md | 9 +- .../list-of-hooks/productSearchProvider.md | 5 +- .../sendMailAlterTemplateVars.md | 3 +- .../hooks/list-of-hooks/termsAndConditions.md | 4 +- .../validateCustomerFormFields.md | 2 +- 316 files changed, 1260 insertions(+), 1186 deletions(-) diff --git a/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md b/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md index 2d6a8509af..54e4f4ccf1 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.2.x/src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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 3c837a6e06..90140f5c3d 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.2.x/src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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/actionAdminAdminShopParametersMetaControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdminShopParametersMetaControllerPostProcessBefore.md index 3010f00ebd..dbff1b27c3 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdminShopParametersMetaControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdminShopParametersMetaControllerPostProcessBefore.md @@ -23,5 +23,10 @@ description: 'This hook is called on Admin Configure Shop Parameters Meta post-p ## Call of the Hook in the origin file ```php -dispatchHookWithParameters('actionAdminAdminShopParametersMetaControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminAdminShopParametersMetaControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAdminWebserviceControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdminWebserviceControllerPostProcessBefore.md index db0cd69e63..d7cc02726f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdminWebserviceControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdminWebserviceControllerPostProcessBefore.md @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHookWithParameters('actionAdminAdminWebserviceControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminAdminWebserviceControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md index e37fecd766..a0f365ac00 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdministrationControllerPostProcessBefore.md @@ -23,5 +23,10 @@ description: 'This hook is called on Admin Configure Advanced Parameters Adminis ## Call of the Hook in the origin file ```php -dispatchHookWithParameters('actionAdminAdministrationControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminAdministrationControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md index e9ba430dc0..df598df21c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md @@ -23,7 +23,7 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHookWithParameters( +dispatchHook( '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 248991f649..cf3e24bd6f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminAdvancedParametersPerformanceControllerPostProcessBefore.md @@ -23,5 +23,10 @@ description: 'This hook is called on Admin Configure Advanced Parameters Perform ## Call of the Hook in the origin file ```php -dispatchHookWithParameters('actionAdminAdvancedParametersPerformanceControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminAdvancedParametersPerformanceControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminBreadcrumbModifier.md b/modules/concepts/hooks/list-of-hooks/actionAdminBreadcrumbModifier.md index b31c824e88..1412b45c9c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminBreadcrumbModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminBreadcrumbModifier.md @@ -3,6 +3,9 @@ Title: actionAdminBreadcrumbModifier hidden: true hookTitle: 'Modify back office breadcrumb' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' + file: classes/controller/AdminController.php - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Twig/Component/Toolbar.php' file: src/PrestaShopBundle/Twig/Component/Toolbar.php @@ -23,5 +26,5 @@ description: 'This hook allows modifying back office breadcrumb' ## Call of the Hook in the origin file ```php -$this->hookDispatcher->dispatchWithParameters('actionAdminBreadcrumbModifier', ['tabs' => $tabs, 'breadcrumb' => &$this->breadcrumbs]); +Hook::exec('actionAdminBreadcrumbModifier', ['tabs' => $tabs, 'breadcrumb' => &$breadcrumbs2], null, true) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitAfter.md b/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitAfter.md index 1c3c087583..0423d17259 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitAfter.md @@ -23,10 +23,10 @@ description: 'This hook is launched after the initialization of all admin contro ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionAdminControllerInitAfter', +'actionAdminControllerInitAfter', [ 'controller' => $this, ] ); + } ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitBefore.md index 88102a8731..5e55f03cee 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminControllerInitBefore.md @@ -23,10 +23,10 @@ description: 'This hook is launched before the initialization of all admin contr ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionAdminControllerInitBefore', +'actionAdminControllerInitBefore', [ 'controller' => $this, ] ); + parent::init(); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md b/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md index 87601e7096..8f9be28df9 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md @@ -1,8 +1,11 @@ --- Title: actionAdminControllerSetMedia hidden: true -hookTitle: '' +hookTitle: files: files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' + file: classes/controller/AdminController.php - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Twig/Component/HeadTag.php' file: src/PrestaShopBundle/Twig/Component/HeadTag.php @@ -24,7 +27,7 @@ description: '' ## Call of the Hook in the origin file ```php -$this->hookDispatcher->dispatchWithParameters('actionAdminControllerSetMedia'); +Hook::exec('actionAdminControllerSetMedia') ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md index 977f1491be..3375bcf0fb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md @@ -1,7 +1,7 @@ --- Title: actionAdminDuplicateAfter hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Update/ProductDuplicator.php' @@ -23,8 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -$this->hookDispatcher->dispatchWithParameters( - 'actionAdminDuplicateAfter', +'actionAdminDuplicateAfter', ['id_product' => $oldProductId, 'id_product_new' => $newProductId] ); + + // @todo: after ##21740 (transactions PR) is resolved. + // Based on if its accepted or not, we need to implement roll back if something went wrong. ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md index ebebe26fac..80c3a36cdf 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md @@ -1,7 +1,7 @@ --- Title: actionAdminDuplicateBefore hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Update/ProductDuplicator.php' @@ -23,8 +23,9 @@ description: '' ## Call of the Hook in the origin file ```php -$this->hookDispatcher->dispatchWithParameters( - 'actionAdminDuplicateBefore', +'actionAdminDuplicateBefore', ['id_product' => $oldProductId] ); + $newProduct = $this->duplicateProduct($productId, $shopConstraint); + $newProductId = (int) $newProduct->id; ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md index dc700e8fec..15ca85fdb0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md @@ -23,7 +23,7 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHookWithParameters( +dispatchHook( '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 2955d96728..fe7b5cd8c0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalGeolocationControllerPostProcessBefore.md @@ -23,5 +23,10 @@ description: 'This hook is called on Admin Improve International Geolocation pos ## Call of the Hook in the origin file ```php -dispatchHookWithParameters('actionAdminInternationalGeolocationControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminInternationalGeolocationControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md index 96a54b3d15..300f353a9e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md @@ -23,7 +23,7 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHookWithParameters( +dispatchHook( '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 789950acf7..146b47dbeb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminInternationalLocalizationControllerPostProcessBefore.md @@ -23,5 +23,10 @@ description: 'This hook is called on Admin Improve International Localization po ## Call of the Hook in the origin file ```php -dispatchHookWithParameters('actionAdminInternationalLocalizationControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminInternationalLocalizationControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminLoginControllerSetMedia.md b/modules/concepts/hooks/list-of-hooks/actionAdminLoginControllerSetMedia.md index f43a4b5c32..4d0ee0dca4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminLoginControllerSetMedia.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminLoginControllerSetMedia.md @@ -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 -$this->hookDispatcher->dispatchWithParameters( - 'actionAdminLoginControllerSetMedia', +'actionAdminLoginControllerSetMedia', [ 'controller' => $this->legacyControllerContext, ] ); + } ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminLogsControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminLogsControllerPostProcessBefore.md index 87fd7f9e00..a239c8b01f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminLogsControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminLogsControllerPostProcessBefore.md @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHookWithParameters('actionAdminLogsControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminLogsControllerPostProcessBefore', ['controller' => $this]); + + return $this->buildSearchResponse( + $definitionFactory, + $request, + LogGridDefinitionFactory::GRID_ID, ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminMaintenanceControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminMaintenanceControllerPostProcessBefore.md index 1dabba86c4..f4f4f2e0f1 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMaintenanceControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMaintenanceControllerPostProcessBefore.md @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHookWithParameters('actionAdminMaintenanceControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminMaintenanceControllerPostProcessBefore', ['controller' => $this]); + $form = $maintenanceFormHandler->getForm(); + $form->handleRequest($request); + + if (!$form->isSubmitted()) { + return $redirectResponse; ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminMenuTabsModifier.md b/modules/concepts/hooks/list-of-hooks/actionAdminMenuTabsModifier.md index 82f9aa19a4..42587789a2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMenuTabsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMenuTabsModifier.md @@ -23,5 +23,5 @@ description: 'This hook allows modifying back office menu tabs' ## Call of the Hook in the origin file ```php -Hook::exec('actionAdminMenuTabsModifier', ['tabs' => &$tabs], null, true); +Hook::exec('actionAdminMenuTabsModifier', ['tabs' => &$tabs], null, true) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md b/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md index 96a1db73e4..9264412414 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md @@ -1,7 +1,7 @@ --- Title: actionAdminMetaAfterWriteRobotsFile hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' @@ -33,8 +33,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionAdminMetaAfterWriteRobotsFile', [ - 'rb_data' => $robots_content, - 'write_fd' => &$write_fd, - ]); +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 39d78d459a..0125ef68ec 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMetaBeforeWriteRobotsFile.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMetaBeforeWriteRobotsFile.md @@ -1,7 +1,7 @@ --- Title: actionAdminMetaBeforeWriteRobotsFile hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' @@ -32,7 +32,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionAdminMetaBeforeWriteRobotsFile', [ - 'rb_data' => &$robots_content, - ]); +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 e1da4dc1f0..c0ad0564ca 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMetaSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMetaSave.md @@ -9,7 +9,8 @@ files: locations: - 'back office' type: action -hookAliases: actionAdminMetaSave +hookAliases: + - afterSaveAdminMeta array_return: false check_exceptions: false chain: false @@ -23,5 +24,5 @@ description: 'This hook is displayed after saving the configuration in AdminMeta ## Call of the Hook in the origin file ```php -$this->hookDispatcher->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 35590303c5..a84bc91d61 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminOrdersTrackingNumberUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminOrdersTrackingNumberUpdate.md @@ -34,9 +34,5 @@ description: 'This hook allows you to execute code after the unique tracking num ## Call of the Hook in the origin file ```php -Hook::exec('actionAdminOrdersTrackingNumberUpdate', [ - 'order' => $order, - 'customer' => $customer, - 'carrier' => $carrier, - ], null, false, true, false, $order->id_shop); +Hook::exec('actionAdminOrdersTrackingNumberUpdate', [ 'order' => $order, 'customer' => $customer, 'carrier' => $carrier, ], 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 c4c5d10824..2fb84ee486 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminPreferencesControllerPostProcessBefore.md @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHookWithParameters('actionAdminPreferencesControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminPreferencesControllerPostProcessBefore', ['controller' => $this]); + + $form = $preferencesFormHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingFieldsModifier.md b/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingFieldsModifier.md index 3d5ac36aee..c536f5fe4b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingFieldsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingFieldsModifier.md @@ -4,8 +4,8 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.2.x/src/Adapter/Product/AdminProductDataProvider.php' - file: src/Adapter/Product/AdminProductDataProvider.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' + file: classes/controller/AdminController.php locations: - 'back office' type: action @@ -37,13 +37,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionAdminProductsListingFieldsModifier', [ - '_ps_version' => AppKernel::VERSION, - 'sql_select' => &$sqlSelect, - 'sql_table' => &$sqlTable, - 'sql_where' => &$sqlWhere, - 'sql_group_by' => &$sqlGroupBy, - 'sql_order' => &$sqlOrder, - 'sql_limit' => &$sqlLimit, - ]) +Hook::exec('action' . $this->controller_name . 'ListingFieldsModifier', [ 'fields' => &$this->fields_list, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingResultsModifier.md b/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingResultsModifier.md index 6e2e56988c..b9d2fd16f9 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingResultsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminProductsListingResultsModifier.md @@ -4,8 +4,8 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/8.2.x/src/Adapter/Product/AdminProductDataProvider.php' - file: src/Adapter/Product/AdminProductDataProvider.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' + file: classes/controller/AdminController.php locations: - 'back office' type: action @@ -34,9 +34,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionAdminProductsListingResultsModifier', [ - '_ps_version' => AppKernel::VERSION, - 'products' => &$products, - 'total' => $total, - ]) +Hook::exec('action' . $this->controller_name . 'ListingResultsModifier', [ 'list' => &$this->_list, 'list_total' => &$this->_listTotal, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminSecurityControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminSecurityControllerPostProcessBefore.md index c0ce7a4c12..c401aa14ee 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminSecurityControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminSecurityControllerPostProcessBefore.md @@ -23,5 +23,10 @@ description: 'This hook is called on Admin Security Controller post-process befo ## Call of the Hook in the origin file ```php -dispatchHookWithParameters('actionAdminSecurityControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminSecurityControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessBefore.md index add697dd14..95caf71746 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessBefore.md @@ -23,8 +23,10 @@ description: 'This hook is called on Admin Improve Shipping Preferences post-pro ## Call of the Hook in the origin file ```php -dispatchHookWithParameters( - 'actionAdminShippingPreferencesControllerPostProcessBefore', +'actionAdminShippingPreferencesControllerPostProcessBefore', ['controller' => $this] - ) + ); + + $form = $carrierOptionsFormHandler->getForm(); + $form->handleRequest($request); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore.md index 9b5c8cc520..e6b4f780ad 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore.md @@ -23,8 +23,10 @@ description: 'This hook is called on Admin Improve Shipping Preferences post-pro ## Call of the Hook in the origin file ```php -dispatchHookWithParameters( - 'actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore', +'actionAdminShippingPreferencesControllerPostProcessCarrierOptionsBefore', ['controller' => $this] - ) + ); + + $this->dispatchHookWithParameters( + 'actionAdminShippingPreferencesControllerPostProcessBefore', ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessHandlingBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessHandlingBefore.md index a119b11daf..3f7af36861 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessHandlingBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShippingPreferencesControllerPostProcessHandlingBefore.md @@ -23,8 +23,10 @@ description: 'This hook is called on Admin Improve Shipping Preferences post-pro ## Call of the Hook in the origin file ```php -dispatchHookWithParameters( - 'actionAdminShippingPreferencesControllerPostProcessHandlingBefore', +'actionAdminShippingPreferencesControllerPostProcessHandlingBefore', ['controller' => $this] - ) + ); + + $this->dispatchHookWithParameters( + 'actionAdminShippingPreferencesControllerPostProcessBefore', ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersMetaControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersMetaControllerPostProcessBefore.md index 6ebf27a85f..383707d7d5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersMetaControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersMetaControllerPostProcessBefore.md @@ -23,7 +23,7 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHookWithParameters( +dispatchHook( '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 735b5734f6..73ad72d3c7 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md @@ -23,7 +23,7 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHookWithParameters( +dispatchHook( '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 ae1d92d573..7189179fae 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersOrderPreferencesControllerPostProcessBefore.md @@ -23,5 +23,10 @@ description: 'This hook is called on Admin Configure Shop Parameters Order Prefe ## Call of the Hook in the origin file ```php -->dispatchHookWithParameters('actionAdminShopParametersOrderPreferencesControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminShopParametersOrderPreferencesControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md index 003d00171f..a369e1fdad 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md @@ -23,7 +23,7 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHookWithParameters( +dispatchHook( '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 bb4b66c4a6..4cd74ef864 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminShopParametersProductPreferencesControllerPostProcessBefore.md @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchHookWithParameters('actionAdminShopParametersProductPreferencesControllerPostProcessBefore', ['controller' => $this]) +$this->dispatchHookWithParameters('actionAdminShopParametersProductPreferencesControllerPostProcessBefore', ['controller' => $this]); + + $form = $formHandler->getForm(); + $form->handleRequest($request); + + if ($form->isSubmitted()) { ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdate_optionsAfter.md b/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdate_optionsAfter.md index 24187169a2..9d8324168d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdate_optionsAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminThemesControllerUpdate_optionsAfter.md @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -$this->hookDispatcher->dispatchWithParameters('actionAdminThemesControllerUpdate_optionsAfter'); +$this->hookDispatcher->dispatchWithParameters('actionAdminThemesControllerUpdate_optionsAfter') ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md b/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md index 0fd375530e..6600fd3401 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md @@ -1,7 +1,7 @@ --- Title: actionAttributeCombinationDelete hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Combination.php' @@ -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 7d8fce1cc1..799807ab48 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationSave.md @@ -1,8 +1,11 @@ --- Title: actionAttributeCombinationSave hidden: true -hookTitle: '' +hookTitle: files: files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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 @@ -23,8 +26,5 @@ description: '' ## Call of the Hook in the origin file ```php -$this->hookDispatcher->dispatchWithParameters( - 'actionAttributeCombinationSave', - ['id_product_attribute' => (int) $combination->id, 'id_attributes' => $generatedCombination] - ); +Hook::exec('actionAttributeCombinationSave', ['id_product_attribute' => (int) $this->id, 'id_attributes' => $idsAttribute]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeDelete.md b/modules/concepts/hooks/list-of-hooks/actionAttributeDelete.md index 0a7a27a310..74504c2ad9 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeDelete.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionAttributeDelete +hookAliases: + - afterDeleteAttribute array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 39e606cf64..7dfe99a792 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeGroupDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeGroupDelete.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionAttributeGroupDelete +hookAliases: + - afterDeleteAttributeGroup array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 286050ba65..ae8bb4005c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeGroupSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeGroupSave.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionAttributeGroupSave +hookAliases: + - afterSaveAttributeGroup array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 d1f40f948c..3973aedf1a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeSave.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionAttributeSave +hookAliases: + - afterSaveAttribute array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 07f63ef4f0..75a1803bc5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAuthentication.md +++ b/modules/concepts/hooks/list-of-hooks/actionAuthentication.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionAuthentication +hookAliases: + - authentication array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 b4f149b868..c94aa5939d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAuthenticationBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAuthenticationBefore.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionAuthenticationBefore +hookAliases: + - actionBeforeAuthentication array_return: false check_exceptions: false chain: false @@ -23,5 +24,5 @@ description: 'Triggers after successful validation of login form, before the log ## 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 0a9317107c..fe592c8df0 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.2.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/actionBuildFrontEndObject.md b/modules/concepts/hooks/list-of-hooks/actionBuildFrontEndObject.md index 87e8b4da01..92d569d71c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionBuildFrontEndObject.md +++ b/modules/concepts/hooks/list-of-hooks/actionBuildFrontEndObject.md @@ -23,7 +23,5 @@ description: 'This hook allows you to customize the "prestashop" javascript obje ## Call of the Hook in the origin file ```php -Hook::exec('actionBuildFrontEndObject', [ - 'obj' => &$object, - ]); +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 9fafaaca98..0ca8e16033 100644 --- a/modules/concepts/hooks/list-of-hooks/actionBuildMailLayoutVariables.md +++ b/modules/concepts/hooks/list-of-hooks/actionBuildMailLayoutVariables.md @@ -4,8 +4,8 @@ hidden: true hookTitle: 'Build the variables used in email layout rendering' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/MailTemplate/Layout/LayoutVariablesBuilder.php' - file: src/Core/MailTemplate/Layout/LayoutVariablesBuilder.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/MailTemplate/Layout/LayoutVariablesBuilderInterface.php' + file: src/Core/MailTemplate/Layout/LayoutVariablesBuilderInterface.php locations: - 'front office' type: action @@ -24,13 +24,12 @@ description: 'This hook allows to change the variables used when an email layout ## Call of the Hook in the origin file ```php -dispatchWithParameters( - LayoutVariablesBuilderInterface::BUILD_MAIL_LAYOUT_VARIABLES_HOOK, - [ - 'mailLayout' => $mailLayout, - 'mailLayoutVariables' => &$mailLayoutVariables, - ] - ) +public const BUILD_MAIL_LAYOUT_VARIABLES_HOOK = 'actionBuildMailLayoutVariables'; + + /** + * @param LayoutInterface $layout + * @param LanguageInterface $language + * ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/actionCarrierProcess.md b/modules/concepts/hooks/list-of-hooks/actionCarrierProcess.md index 58e93afda1..5e243e6c74 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCarrierProcess.md +++ b/modules/concepts/hooks/list-of-hooks/actionCarrierProcess.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionCarrierProcess +hookAliases: + - processCarrier array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 db9816c895..96366aae82 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCarrierUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionCarrierUpdate.md @@ -3,13 +3,20 @@ Title: actionCarrierUpdate hidden: true hookTitle: 'Carrier Update' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminCarrierWizardController.php' + file: controllers/admin/AdminCarrierWizardController.php - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminCarriersController.php' file: controllers/admin/AdminCarriersController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Carrier/CommandHandler/EditCarrierHandler.php' + file: src/Adapter/Carrier/CommandHandler/EditCarrierHandler.php locations: - 'back office' type: action -hookAliases: actionCarrierUpdate +hookAliases: + - updateCarrier array_return: false check_exceptions: false chain: false @@ -23,8 +30,5 @@ description: 'This hook is called when a carrier is updated' ## Call of the Hook in the origin file ```php -Hook::exec('actionCarrierUpdate', [ - 'id_carrier' => (int) $current_carrier->id, - 'carrier' => $new_carrier, - ]); +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 a832d5a138..2e520a4c20 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCartGetPackageShippingCost.md +++ b/modules/concepts/hooks/list-of-hooks/actionCartGetPackageShippingCost.md @@ -23,17 +23,10 @@ description: 'This hook is called in order to allow to modify package shipping c ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionCartGetPackageShippingCost', +'actionCartGetPackageShippingCost', [ 'cart' => $this, 'id_carrier' => $id_carrier, 'use_tax' => $use_tax, 'default_country' => $default_country, - 'product_list' => $product_list, - 'id_zone' => $id_zone, - 'keepOrderPrices' => $keepOrderPrices, - 'shippingCost' => &$shippingCost, - ] - ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCartSave.md b/modules/concepts/hooks/list-of-hooks/actionCartSave.md index 09059f25e6..1a2680c80b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCartSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionCartSave.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionCartSave +hookAliases: + - cart array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 e92e9bb497..97e5abef0d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCartSummary.md +++ b/modules/concepts/hooks/list-of-hooks/actionCartSummary.md @@ -1,7 +1,7 @@ --- Title: actionCartSummary hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionCartSummary', $summary, null, true); +$hook = 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 66f9153775..1ec757de96 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCartUpdateQuantityBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionCartUpdateQuantityBefore.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionCartUpdateQuantityBefore +hookAliases: + - actionBeforeCartUpdateQty array_return: false check_exceptions: false chain: false @@ -23,5 +24,5 @@ description: 'Allows responding to add to cart events.' ## 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 9dbcdfe851..e97d57134f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCategoryAdd.md +++ b/modules/concepts/hooks/list-of-hooks/actionCategoryAdd.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionCategoryAdd +hookAliases: + - categoryAddition array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 aa7beb797c..54b4b42769 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCategoryDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionCategoryDelete.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionCategoryDelete +hookAliases: + - categoryDeletion array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 ade173ad07..a7625cf636 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCategoryUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionCategoryUpdate.md @@ -9,7 +9,8 @@ files: locations: - 'back office' type: action -hookAliases: actionCategoryUpdate +hookAliases: + - categoryUpdate array_return: false check_exceptions: false chain: false @@ -23,5 +24,5 @@ description: 'This hook is displayed when a category is modified' ## Call of the Hook in the origin file ```php -Hook::exec('actionCategoryUpdate', ['category' => new Category($movedCategory['id_category'])]); +Hook::exec('actionCategoryUpdate', ['category' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionCheckoutRender.md b/modules/concepts/hooks/list-of-hooks/actionCheckoutRender.md index b818ac349f..b65be3c4bc 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCheckoutRender.md +++ b/modules/concepts/hooks/list-of-hooks/actionCheckoutRender.md @@ -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 4aed367734..f33b4c643a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionClearCache.md +++ b/modules/concepts/hooks/list-of-hooks/actionClearCache.md @@ -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 8d7e158887..a290251e3d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionClearCompileCache.md +++ b/modules/concepts/hooks/list-of-hooks/actionClearCompileCache.md @@ -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 21f1a91ee2..495662626e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionClearSf2Cache.md +++ b/modules/concepts/hooks/list-of-hooks/actionClearSf2Cache.md @@ -3,6 +3,9 @@ Title: actionClearSf2Cache hidden: true hookTitle: 'Clear Sf2 cache' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' + file: classes/Tools.php - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Cache/Clearer/SymfonyCacheClearer.php' file: src/Adapter/Cache/Clearer/SymfonyCacheClearer.php @@ -23,5 +26,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 0d9a72a35b..7bbf8757fb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionControllerInitAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionControllerInitAfter.md @@ -23,10 +23,10 @@ description: 'This hook is launched after the initialization of all controllers' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionControllerInitAfter', +'actionControllerInitAfter', [ 'controller' => $this, ] ); + } ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionControllerInitBefore.md b/modules/concepts/hooks/list-of-hooks/actionControllerInitBefore.md index b3b4ced02f..7e4f44570f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionControllerInitBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionControllerInitBefore.md @@ -23,8 +23,7 @@ description: 'This hook is launched before the initialization of all controllers ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionControllerInitBefore', +'actionControllerInitBefore', [ 'controller' => $this, ] diff --git a/modules/concepts/hooks/list-of-hooks/actionCustomerAccountAdd.md b/modules/concepts/hooks/list-of-hooks/actionCustomerAccountAdd.md index 70eb62283b..b4563c9818 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerAccountAdd.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerAccountAdd.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionCustomerAccountAdd +hookAliases: + - createAccount array_return: false check_exceptions: false chain: false @@ -32,7 +33,5 @@ description: 'This hook is called when a new customer creates an account success ## Call of the Hook in the origin file ```php -Hook::exec('actionCustomerAccountAdd', [ - 'newCustomer' => $customer, - ]); +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 db0482d45c..4e4b9b8f25 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerAccountUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerAccountUpdate.md @@ -23,7 +23,5 @@ description: 'This hook is called when a customer updates its account successful ## Call of the Hook in the origin file ```php -Hook::exec('actionCustomerAccountUpdate', [ - 'customer' => $customer, - ]); +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 69b6376a95..86e28a03b2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerAddGroups.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerAddGroups.md @@ -1,7 +1,7 @@ --- Title: actionCustomerAddGroups hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Customer.php' @@ -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 95972cbf07..8dec70196a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerBeforeUpdateGroup.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerBeforeUpdateGroup.md @@ -1,7 +1,7 @@ --- Title: actionCustomerBeforeUpdateGroup hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Customer.php' @@ -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 84163217fe..2f8a6ec710 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutAfter.md @@ -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 e03c56b0f1..3bb04bcd16 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerLogoutBefore.md @@ -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 6bbd949854..721b0ccc35 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: 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 1b2379a755..9122834e91 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByPrice.md +++ b/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByPrice.md @@ -1,7 +1,7 @@ --- Title: actionDeliveryPriceByPrice hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Carrier.php' @@ -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]); +$price_by_price = 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 f588cd8e58..ea7490d6a8 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByWeight.md +++ b/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByWeight.md @@ -1,7 +1,7 @@ --- Title: actionDeliveryPriceByWeight hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Carrier.php' @@ -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]); +$price_by_weight = 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 a61a0c624b..5b20e23988 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDispatcher.md +++ b/modules/concepts/hooks/list-of-hooks/actionDispatcher.md @@ -1,11 +1,14 @@ --- Title: actionDispatcher hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Dispatcher.php' file: classes/Dispatcher.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/LegacyController.php' + file: src/PrestaShopBundle/Controller/Admin/LegacyController.php locations: - 'front office' type: action @@ -23,5 +26,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 0cda31b662..87d8624e5e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDispatcherAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionDispatcherAfter.md @@ -6,6 +6,12 @@ files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Dispatcher.php' file: classes/Dispatcher.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Controller/Admin/LegacyController.php' + file: src/PrestaShopBundle/Controller/Admin/LegacyController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/EventListener/ActionDispatcherLegacyHooksSubscriber.php' + file: src/PrestaShopBundle/EventListener/ActionDispatcherLegacyHooksSubscriber.php locations: - 'front office' type: action @@ -23,5 +29,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 -Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher); +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 b6001dd5d7..94144a6f05 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDispatcherBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionDispatcherBefore.md @@ -3,6 +3,12 @@ Title: actionDispatcherBefore hidden: true hookTitle: 'Before dispatch' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Dispatcher.php' + file: classes/Dispatcher.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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 @@ -23,5 +29,5 @@ description: 'This hook is called at the beginning of the dispatch method of the ## Call of the Hook in the origin file ```php -$this->hookDispatcher->dispatchWithParameters('actionDispatcherBefore', ['controller_type' => Dispatcher::FC_ADMIN]); +Hook::exec('actionDispatcherBefore', ['controller_type' => $this->front_controller]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md b/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md index 1e139261a2..08dd98ccd5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md +++ b/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md @@ -1,7 +1,7 @@ --- Title: actionDownloadAttachment hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/AttachmentController.php' @@ -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 a240552e8e..0ba8d5d8e8 100644 --- a/modules/concepts/hooks/list-of-hooks/actionEmailAddAfterContent.md +++ b/modules/concepts/hooks/list-of-hooks/actionEmailAddAfterContent.md @@ -23,15 +23,10 @@ description: 'This hook is called just after fetching mail template' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionEmailAddAfterContent', +'actionEmailAddAfterContent', [ 'template' => $template, 'template_html' => &$templateHtml, 'template_txt' => &$templateTxt, 'id_lang' => (int) $idLang, - ], - null, - true - ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionEmailAddBeforeContent.md b/modules/concepts/hooks/list-of-hooks/actionEmailAddBeforeContent.md index dfd8d0c54d..f227a5634e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionEmailAddBeforeContent.md +++ b/modules/concepts/hooks/list-of-hooks/actionEmailAddBeforeContent.md @@ -23,15 +23,10 @@ description: 'This hook is called just before fetching mail template' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionEmailAddBeforeContent', +'actionEmailAddBeforeContent', [ 'template' => $template, 'template_html' => &$templateHtml, 'template_txt' => &$templateTxt, 'id_lang' => (int) $idLang, - ], - null, - true - ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionEmailSendBefore.md b/modules/concepts/hooks/list-of-hooks/actionEmailSendBefore.md index bd73c2c475..c5656825a5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionEmailSendBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionEmailSendBefore.md @@ -23,27 +23,10 @@ description: 'This hook is used to filter the content or the metadata of an emai ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionEmailSendBefore', +'actionEmailSendBefore', [ 'idLang' => &$idLang, 'template' => &$template, 'subject' => &$subject, 'templateVars' => &$templateVars, - 'to' => &$to, - 'toName' => &$toName, - 'from' => &$from, - 'fromName' => &$fromName, - 'fileAttachment' => &$fileAttachment, - 'mode_smtp' => &$mode_smtp, - 'templatePath' => &$templatePath, - 'die' => &$die, - 'idShop' => &$idShop, - 'bcc' => &$bcc, - 'replyTo' => &$replyTo, - 'replyToName' => &$replyToName, - ], - null, - true - ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md b/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md index 2c1fb51896..2d0f8e0ac6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md +++ b/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md @@ -1,16 +1,15 @@ --- Title: actionExportGDPRData hidden: true -hookTitle: '' +hookTitle: files: files: - - url: 'https://github.com/PrestaShop/psgdpr/blob/master/psgdpr.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/modules/psgdpr/psgdpr.php' file: modules/psgdpr/psgdpr.php locations: - 'front office' type: action hookAliases: -'Hook origin': module array_return: false check_exceptions: false chain: false @@ -24,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionExportGDPRData', (array) $customer, $module['id_module']) +Hook::exec('actionExportGDPRData', $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 f8b8034572..d376be3c21 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFeatureDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionFeatureDelete.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionFeatureDelete +hookAliases: + - afterDeleteFeature array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 f7afe9fec9..4cd76b1735 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFeatureSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionFeatureSave.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionFeatureSave +hookAliases: + - afterSaveFeature array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 6385fdca68..02ed93f03c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFeatureValueDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionFeatureValueDelete.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionFeatureValueDelete +hookAliases: + - afterDeleteFeatureValue array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 9b9a1abaaf..5aa94f989e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFeatureValueSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionFeatureValueSave.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionFeatureValueSave +hookAliases: + - afterSaveFeatureValue array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 46ac036c5a..16c0c5d4c2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFilterDeliveryOptionList.md +++ b/modules/concepts/hooks/list-of-hooks/actionFilterDeliveryOptionList.md @@ -33,8 +33,7 @@ description: 'This hook allows you to modify delivery option list' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionFilterDeliveryOptionList', +'actionFilterDeliveryOptionList', [ 'delivery_option_list' => &$delivery_option_list, 'cart' => $this, diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerDetectContextCountryAfter.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerDetectContextCountryAfter.md index ffe02fa19f..7724a22684 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerDetectContextCountryAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerDetectContextCountryAfter.md @@ -23,8 +23,7 @@ description: 'Allows modules to modify the context country after it has been det ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionFrontControllerDetectContextCountryAfter', +'actionFrontControllerDetectContextCountryAfter', [ 'controller' => $this, ] diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitAfter.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitAfter.md index c7900ee1c4..f2606f79ef 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitAfter.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionFrontControllerInitAfter +hookAliases: + - actionFrontControllerAfterInit array_return: false check_exceptions: false chain: false @@ -23,10 +24,5 @@ description: 'This hook is launched after the initialization of all front office ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionFrontControllerInitAfter', - [ - 'controller' => $this, - ] - ); +'actionFrontControllerInitAfter', [ 'controller' => $this, ] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitBefore.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitBefore.md index 902e64519b..f3a9fd5d78 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitBefore.md @@ -23,10 +23,5 @@ description: 'This hook is launched before the initialization of all front offic ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionFrontControllerInitBefore', - [ - 'controller' => $this, - ] - ); +'actionFrontControllerInitBefore', [ 'controller' => $this, ] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitContextCurrencyAfter.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitContextCurrencyAfter.md index a4315761fc..f64c1ef5c1 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitContextCurrencyAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerInitContextCurrencyAfter.md @@ -23,8 +23,7 @@ description: 'Allows modules to modify the context currency after it has been in ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionFrontControllerInitContextCurrencyAfter', +'actionFrontControllerInitContextCurrencyAfter', [ 'controller' => $this, ] diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md index d00b269267..86a901929f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md @@ -1,7 +1,7 @@ --- Title: actionFrontControllerSetMedia hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' @@ -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 c96b43dfb8..19a820ea0e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariables.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariables.md @@ -40,12 +40,10 @@ description: 'Add variables to javascript object that is available in Front Offi ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionFrontControllerSetVariables', +'actionFrontControllerSetVariables', [ 'templateVars' => &$templateVars, ], null, true - ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariablesBefore.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariablesBefore.md index a49e3d2948..579d29c31c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariablesBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetVariablesBefore.md @@ -23,8 +23,7 @@ description: 'Allows defining variables for the JavaScript object before the cor ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionFrontControllerSetVariablesBefore', +'actionFrontControllerSetVariablesBefore', [ 'templateVars' => &$templateVars, 'cart' => $cart, diff --git a/modules/concepts/hooks/list-of-hooks/actionGenerateDocumentReference.md b/modules/concepts/hooks/list-of-hooks/actionGenerateDocumentReference.md index bdce4bfae0..912f45d7f3 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGenerateDocumentReference.md +++ b/modules/concepts/hooks/list-of-hooks/actionGenerateDocumentReference.md @@ -23,7 +23,5 @@ description: 'This hook allows modules to return custom document references' ## Call of the Hook in the origin file ```php -Hook::exec('actionGenerateDocumentReference', [ - 'type' => 'order', - ]); +$reference = 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 89be4a5a63..b94a98746f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetAdminOrderButtons.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetAdminOrderButtons.md @@ -35,14 +35,12 @@ description: 'This hook is used to generate the buttons collection on the order ## Call of the Hook in the origin file ```php -dispatchHookWithParameters( - 'actionGetAdminOrderButtons', +'actionGetAdminOrderButtons', [ 'controller' => $this, 'id_order' => $orderId, 'actions_bar_buttons_collection' => $backOfficeOrderButtons, ] - ) ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/actionGetAdminToolbarButtons.md b/modules/concepts/hooks/list-of-hooks/actionGetAdminToolbarButtons.md index 25cc59cce3..2318108ed0 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetAdminToolbarButtons.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetAdminToolbarButtons.md @@ -33,8 +33,5 @@ description: 'This hook allows you to define descriptions of buttons to add in a ## Call of the Hook in the origin file ```php -Hook::exec('actionGetAdminToolbarButtons', [ - 'controller' => $this, - 'toolbar_extra_buttons_collection' => &$toolbarButtonsCollection, - ]); +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 d4006f86b5..0b67c51e3e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetAlternativeSearchPanels.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetAlternativeSearchPanels.md @@ -33,13 +33,10 @@ description: 'This hook allows to add an additional search panel for external pr ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionGetAlternativeSearchPanels', +'actionGetAlternativeSearchPanels', [ 'previous_search_panels' => $searchPanels, 'bo_query' => $searchedExpression, ], null, - true - ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md b/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md index c94b494c11..527db2eda7 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md @@ -1,7 +1,7 @@ --- Title: actionGetExtraMailTemplateVars hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Mail.php' @@ -23,15 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionGetExtraMailTemplateVars', +'actionGetExtraMailTemplateVars', [ 'template' => $template, 'template_vars' => $templateVars, 'extra_template_vars' => &$extraTemplateVars, 'id_lang' => (int) $idLang, - ], - null, - true - ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md b/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md index b77b55d53b..88956777d8 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md @@ -1,7 +1,7 @@ --- Title: actionGetIDZoneByAddressID hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Address.php' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionGetIDZoneByAddressID', ['id_address' => $id_address]); +$id_zone = 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 7d9077574b..e97e1c426c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfter.md @@ -1,8 +1,11 @@ --- Title: actionGetProductPropertiesAfter hidden: true -hookTitle: '' +hookTitle: files: files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' + file: classes/Hook.php - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php @@ -23,9 +26,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionGetProductPropertiesAfter', [ - 'id_lang' => $id_lang, - 'product' => &$row, - 'context' => $context, - ]); +'actionGetProductPropertiesAfter' => ['from' => '1.7.8.0'], + ]; + + public const MODULE_LIST_BY_HOOK_KEY = 'hook_module_exec_list_'; + + public function add($autodate = true, $null_values = false) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfterUnitPrice.md b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfterUnitPrice.md index e675851b08..68aef46cba 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfterUnitPrice.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfterUnitPrice.md @@ -23,9 +23,5 @@ description: 'This hook is called after defining the properties of a product' ## Call of the Hook in the origin file ```php -Hook::exec('actionGetProductPropertiesAfterUnitPrice', [ - 'id_lang' => $id_lang, - 'product' => &$row, - 'context' => $context, - ]); +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 0ee1f0c8a9..9ef4759ed7 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesBefore.md @@ -1,7 +1,7 @@ --- Title: actionGetProductPropertiesBefore hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' @@ -23,9 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionGetProductPropertiesBefore', [ - 'id_lang' => $id_lang, - 'product' => &$row, - 'context' => $context, - ]); +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 517d0b316f..b2e0ba8b9d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionHtaccessCreate.md +++ b/modules/concepts/hooks/list-of-hooks/actionHtaccessCreate.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionHtaccessCreate +hookAliases: + - afterCreateHtaccess array_return: false check_exceptions: false chain: false @@ -23,5 +24,5 @@ description: 'This hook is displayed after the htaccess creation' ## Call of the Hook in the origin file ```php -Hook::exec('actionHtaccessCreate', ['path' => $path]); +Hook::exec('actionHtaccessCreate', ['path' => $path]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md b/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md index 8c1956eff2..cfc4fbc6e3 100644 --- a/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md +++ b/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md @@ -1,7 +1,7 @@ --- Title: actionInvoiceNumberFormatted hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderInvoice.php' @@ -23,10 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionInvoiceNumberFormatted', [ - get_class($this) => $this, - 'id_lang' => (int) $id_lang, - 'id_shop' => (int) $id_shop, - 'number' => (int) $this->number, - ]); +$invoice_formatted_number = Hook::exec('actionInvoiceNumberFormatted', [ get_class($this) => $this, '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 71d312d0b8..95e8af6c42 100644 --- a/modules/concepts/hooks/list-of-hooks/actionLanguageLinkParameters.md +++ b/modules/concepts/hooks/list-of-hooks/actionLanguageLinkParameters.md @@ -23,8 +23,10 @@ description: 'Allows modules to provide proper parameters for links in other lan ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionLanguageLinkParameters', +'actionLanguageLinkParameters', ['linkParams' => &$params, 'linkIdLang' => (int) $idLang] ); + unset($params['fc'], $params['module']); + + return $this->getModuleLink($module, $controller, $params, null, (int) $idLang); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionLoggerLogMessage.md b/modules/concepts/hooks/list-of-hooks/actionLoggerLogMessage.md index e9d509e08f..d6896130bd 100644 --- a/modules/concepts/hooks/list-of-hooks/actionLoggerLogMessage.md +++ b/modules/concepts/hooks/list-of-hooks/actionLoggerLogMessage.md @@ -24,12 +24,10 @@ description: 'This hook allows to make an extra action while an exception is thr ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionLoggerLogMessage', +'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 0af4751132..4cd6d516b4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionMailAlterMessageBeforeSend.md +++ b/modules/concepts/hooks/list-of-hooks/actionMailAlterMessageBeforeSend.md @@ -23,7 +23,5 @@ description: 'This hook is called before the Swift Message is sent in Mail.php' ## Call of the Hook in the origin file ```php -Hook::exec('actionMailAlterMessageBeforeSend', [ - 'message' => &$email, - ]); +Hook::exec('actionMailAlterMessageBeforeSend', [ 'message' => &$email, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionModifyFrontendSitemap.md b/modules/concepts/hooks/list-of-hooks/actionModifyFrontendSitemap.md index f80fb7b48b..6edf9b9e95 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModifyFrontendSitemap.md +++ b/modules/concepts/hooks/list-of-hooks/actionModifyFrontendSitemap.md @@ -24,16 +24,12 @@ description: 'This hook allows to modify links on sitemap page of your shop. Use ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionModifyFrontendSitemap', - ['urls' => &$sitemapUrls], - null, - false, - true, - false, - null, - true -); +'actionModifyFrontendSitemap', + ['urls' => &$sitemapUrls] + ); + + /* + * Backward compatibility with older themes. ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleInstallAfter.md b/modules/concepts/hooks/list-of-hooks/actionModuleInstallAfter.md index 1720f8cab9..6a6dd35050 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleInstallAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleInstallAfter.md @@ -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 7b180ea847..f42a3900fe 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleInstallBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleInstallBefore.md @@ -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 53b3097d3e..adafa505a3 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: 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 0d482b9207..b21b3ac8ef 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookAfter.md @@ -1,7 +1,7 @@ --- Title: actionModuleRegisterHookAfter hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' @@ -23,8 +23,5 @@ 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 c5cc85e9df..cf932089ea 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookBefore.md @@ -1,7 +1,7 @@ --- Title: actionModuleRegisterHookBefore hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' @@ -23,8 +23,5 @@ 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 e05c501712..1b10d38741 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookAfter.md @@ -1,7 +1,7 @@ --- Title: actionModuleUnRegisterHookAfter hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' @@ -23,8 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionModuleUnRegisterHookAfter', [ - 'object' => $module_instance, - 'hook_name' => $hook_name, - ]); +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 d9770c015d..87a3467793 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookBefore.md @@ -1,7 +1,7 @@ --- Title: actionModuleUnRegisterHookBefore hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' @@ -23,8 +23,5 @@ 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 434db56707..10c623e983 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleUninstallAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleUninstallAfter.md @@ -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 4954f87c76..e7a341c250 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleUninstallBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleUninstallBefore.md @@ -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 d0447f5099..e2ceb5e817 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: 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 36097ad77b..7ed7b76fcf 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: 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 436eb00589..f2d2156698 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectAddAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectAddAfter.md @@ -1,7 +1,7 @@ --- Title: actionObjectAddAfter hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' @@ -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 3c1bc162d4..be51635052 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectAddBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectAddBefore.md @@ -1,7 +1,7 @@ --- Title: actionObjectAddBefore hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' @@ -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 b884dc4b97..17684e5133 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectDeleteAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectDeleteAfter.md @@ -1,7 +1,7 @@ --- Title: actionObjectDeleteAfter hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' @@ -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 d194367daf..70685ac2d2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectDeleteBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectDeleteBefore.md @@ -1,7 +1,7 @@ --- Title: actionObjectDeleteBefore hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' @@ -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 f71b14feb6..a17b0d11f6 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: files: - module: productcomments diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteAfter.md b/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteAfter.md index 75ff80a02f..4bd4897848 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteAfter.md @@ -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 5ac58234e7..fc89775dbb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectProductInCartDeleteBefore.md @@ -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 d99204fda0..fc102daa31 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectUpdateAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectUpdateAfter.md @@ -1,7 +1,7 @@ --- Title: actionObjectUpdateAfter hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' @@ -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 6f2532de5e..a25e64cd75 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectUpdateBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectUpdateBefore.md @@ -1,7 +1,7 @@ --- Title: actionObjectUpdateBefore hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' @@ -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 85f5da7a78..a381f2175d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOnImageCutAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionOnImageCutAfter.md @@ -1,7 +1,7 @@ --- Title: actionOnImageCutAfter hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ImageManager.php' @@ -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 7e2903986c..d00b6cc97d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOnImageResizeAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionOnImageResizeAfter.md @@ -1,7 +1,7 @@ --- Title: actionOnImageResizeAfter hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ImageManager.php' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionOnImageResizeAfter', ['dst_file' => $destinationFile, 'file_type' => $destinationFileType]); +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 e9b3b046ea..b50636b47a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderEdited.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderEdited.md @@ -3,9 +3,15 @@ Title: actionOrderEdited hidden: true hookTitle: 'Order edited' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/AddProductToOrderHandler.php' + file: src/Adapter/Order/CommandHandler/AddProductToOrderHandler.php - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/DeleteProductFromOrderHandler.php' file: src/Adapter/Order/CommandHandler/DeleteProductFromOrderHandler.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/UpdateProductInOrderHandler.php' + file: src/Adapter/Order/CommandHandler/UpdateProductInOrderHandler.php locations: - 'front office' type: action @@ -31,5 +37,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 9b4fa120a1..64a8269f52 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderHistoryAddAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderHistoryAddAfter.md @@ -1,7 +1,7 @@ --- Title: actionOrderHistoryAddAfter hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderHistory.php' @@ -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 1451166d82..dc65508541 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderReturn.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderReturn.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionOrderReturn +hookAliases: + - orderReturn array_return: false check_exceptions: false chain: false @@ -32,5 +33,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 99df483a80..7f09f1c670 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderSlipAdd.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderSlipAdd.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionOrderSlipAdd +hookAliases: + - orderSlip array_return: false check_exceptions: true chain: false @@ -45,10 +46,5 @@ description: 'This hook is called when a new credit slip is added regarding clie ## Call of the Hook in the origin file ```php -Hook::exec('actionOrderSlipAdd', [ - 'order' => $order, - 'productList' => $orderRefundSummary->getProductRefunds(), - 'qtyList' => $fullQuantityList, - 'orderSlipCreated' => $this->orderSlipCreated, - ], null, false, true, false, $order->id_shop); +Hook::exec('actionOrderSlipAdd', [ 'order' => $order, 'productList' => $orderRefundSummary->getProductRefunds(), 'qtyList' => $fullQuantityList, '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 f083992fec..c3a44d5e1e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderStatusPostUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderStatusPostUpdate.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionOrderStatusPostUpdate +hookAliases: + - postUpdateOrderStatus array_return: false check_exceptions: true chain: false @@ -34,9 +35,5 @@ description: 'Allows to be notified after order status is changed.' ## Call of the Hook in the origin file ```php -Hook::exec('actionOrderStatusPostUpdate', [ - 'newOrderStatus' => $new_os, - 'oldOrderStatus' => $old_os, - 'id_order' => (int) $order->id, - ], null, false, true, false, $order->id_shop); +Hook::exec('actionOrderStatusPostUpdate', [ 'newOrderStatus' => $new_os, 'oldOrderStatus' => $old_os, 'id_order' => (int) $order->id, ], 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 c559ed7488..d6d08d9d59 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderStatusUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderStatusUpdate.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionOrderStatusUpdate +hookAliases: + - updateOrderStatus array_return: false check_exceptions: true chain: false @@ -34,9 +35,5 @@ description: 'This hook launches modules when the status of an order changes' ## Call of the Hook in the origin file ```php -Hook::exec('actionOrderStatusUpdate', [ - 'newOrderStatus' => $new_os, - 'oldOrderStatus' => $old_os, - 'id_order' => (int) $order->id, - ], null, false, true, false, $order->id_shop); +Hook::exec('actionOrderStatusUpdate', [ 'newOrderStatus' => $new_os, 'oldOrderStatus' => $old_os, 'id_order' => (int) $order->id, ], 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 310269e4a7..786c4fcb06 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOutputHTMLBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionOutputHTMLBefore.md @@ -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 fe9134cc57..a0351eb54e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOverrideEmployeeImage.md +++ b/modules/concepts/hooks/list-of-hooks/actionOverrideEmployeeImage.md @@ -23,8 +23,7 @@ description: 'This hook is used to get the employee image' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionOverrideEmployeeImage', +'actionOverrideEmployeeImage', [ 'employee' => $this, 'imageUrl' => &$imageUrl, diff --git a/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreePrice.md b/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreePrice.md index e09f83ccf4..b4c8dafb10 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreePrice.md +++ b/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreePrice.md @@ -23,5 +23,5 @@ description: 'Allows modules to override the free shipping price and return thei ## Call of the Hook in the origin file ```php -Hook::exec('actionOverrideShippingFreePrice', ['shippingFreePrice' => &$shippingFreePrice, 'id_zone' => $id_zone, 'id_currency' => $this->id_currency]); +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 index f7c9305105..65c5d4db3d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreeWeight.md +++ b/modules/concepts/hooks/list-of-hooks/actionOverrideShippingFreeWeight.md @@ -23,5 +23,5 @@ description: 'Allows modules to override the free shipping weight and return the ## Call of the Hook in the origin file ```php -Hook::exec('actionOverrideShippingFreeWeight', ['shippingFreeWeight' => &$shippingFreeWeight, 'id_zone' => $id_zone, 'id_currency' => $this->id_currency]); +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 42cd18b1bb..2b1b41a847 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPDFInvoiceRender.md +++ b/modules/concepts/hooks/list-of-hooks/actionPDFInvoiceRender.md @@ -3,6 +3,21 @@ Title: actionPDFInvoiceRender hidden: true hookTitle: 'PDF Invoice - Render' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/PaymentModule.php' + file: classes/PaymentModule.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderHistory.php' + file: classes/order/OrderHistory.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminPdfController.php' + file: controllers/admin/AdminPdfController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/PdfInvoiceController.php' + file: controllers/front/PdfInvoiceController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/PDF/InvoicePdfGenerator.php' + file: src/Adapter/PDF/InvoicePdfGenerator.php - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/PDF/OrderInvoicePdfGenerator.php' file: src/Adapter/PDF/OrderInvoicePdfGenerator.php @@ -23,5 +38,5 @@ description: 'This hook is called when a PDF invoice is rendered from the Front ## 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 f41bb20cd6..b580c370eb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPasswordRenew.md +++ b/modules/concepts/hooks/list-of-hooks/actionPasswordRenew.md @@ -1,7 +1,7 @@ --- Title: actionPasswordRenew hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/PasswordController.php' @@ -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 27c24d770c..a7e9252ec4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPaymentCCAdd.md +++ b/modules/concepts/hooks/list-of-hooks/actionPaymentCCAdd.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionPaymentCCAdd +hookAliases: + - paymentCCAdded array_return: false check_exceptions: false chain: false @@ -32,5 +33,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 9ecad185de..a4979d8213 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPaymentConfirmation.md +++ b/modules/concepts/hooks/list-of-hooks/actionPaymentConfirmation.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionPaymentConfirmation +hookAliases: + - paymentConfirm array_return: false check_exceptions: true chain: false @@ -32,5 +33,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 65c71cafce..a47ef66fd5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentCart.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentCart.md @@ -23,7 +23,5 @@ description: 'This hook is called before a cart is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentCart', - ['presentedCart' => &$cartLazyArray] - ); +Hook::exec('actionPresentCart', ['presentedCart' => &$cartLazyArray] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentCategory.md b/modules/concepts/hooks/list-of-hooks/actionPresentCategory.md index 2898044b51..01b63313c4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentCategory.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentCategory.md @@ -23,7 +23,5 @@ description: 'This hook is called before a category is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentCategory', - ['presentedCategory' => &$categoryLazyArray] - ); +Hook::exec('actionPresentCategory', ['presentedCategory' => &$categoryLazyArray] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentManufacturer.md b/modules/concepts/hooks/list-of-hooks/actionPresentManufacturer.md index 8fd7caf6d3..e279f9cbab 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentManufacturer.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentManufacturer.md @@ -23,7 +23,5 @@ description: 'This hook is called before a manufacturer is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentManufacturer', - ['presentedManufacturer' => &$manufacturerLazyArray] - ); +Hook::exec('actionPresentManufacturer', ['presentedManufacturer' => &$manufacturerLazyArray] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentModule.md b/modules/concepts/hooks/list-of-hooks/actionPresentModule.md index b0d270f49b..c2fe0256d9 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentModule.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentModule.md @@ -1,7 +1,7 @@ --- Title: actionPresentModule hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Module/ModulePresenter.php' @@ -23,7 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentModule', - ['presentedModule' => &$result] - ); +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 0479f5f54e..1ec2570d43 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentObject.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentObject.md @@ -23,5 +23,5 @@ description: 'This hook is called before an object is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentObject', ['presentedObject' => &$presentedObject, 'table' => $object::$definition['table']]); +Hook::exec('actionPresentObject', ['presentedObject' => &$presentedObject, 'table' => $object::$definition['table']]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentOrder.md b/modules/concepts/hooks/list-of-hooks/actionPresentOrder.md index fed48f00af..3774c27506 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentOrder.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentOrder.md @@ -23,7 +23,5 @@ description: 'This hook is called before an order is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentOrder', - ['presentedOrder' => &$orderLazyArray] - ); +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 dc5cf43b4c..3e8c98d499 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentOrderReturn.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentOrderReturn.md @@ -23,7 +23,5 @@ description: 'This hook is called before an order return is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentOrderReturn', - ['presentedOrderReturn' => &$orderReturnLazyArray] - ); +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 091b8a913d..0013525c05 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentPaymentOptions.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentPaymentOptions.md @@ -32,7 +32,5 @@ description: 'This hook is called before payment options are presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentPaymentOptions', - ['paymentOptions' => &$paymentOptions] - ); +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 bba4276ac3..84add1c46f 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentProduct.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentProduct.md @@ -23,9 +23,7 @@ description: 'This hook is called before a product is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentProduct', - ['presentedProduct' => &$productLazyArray] - ); +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 70d795fdc1..54ae57e2bb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentProductListing.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentProductListing.md @@ -3,6 +3,9 @@ Title: actionPresentProductListing hidden: true hookTitle: 'Product Listing Presenter' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Cart/CartProductPresenter.php' + file: src/Adapter/Presenter/Cart/CartProductPresenter.php - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Product/ProductListingPresenter.php' file: src/Adapter/Presenter/Product/ProductListingPresenter.php @@ -23,7 +26,5 @@ description: 'This hook is called before a product listing is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentProductListing', - ['presentedProduct' => &$productListingLazyArray] - ); +Hook::exec('actionPresentProductListing', ['presentedProduct' => &$cartProductLazyArray] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentStore.md b/modules/concepts/hooks/list-of-hooks/actionPresentStore.md index 4def6615ff..fa87570c5e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentStore.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentStore.md @@ -23,7 +23,5 @@ description: 'This hook is called before a store is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentStore', - ['presentedStore' => &$storeLazyArray] - ); +Hook::exec('actionPresentStore', ['presentedStore' => &$storeLazyArray] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentSupplier.md b/modules/concepts/hooks/list-of-hooks/actionPresentSupplier.md index 8e9492aa57..1e42a09a65 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentSupplier.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentSupplier.md @@ -23,7 +23,5 @@ description: 'This hook is called before a supplier is presented' ## Call of the Hook in the origin file ```php -Hook::exec('actionPresentSupplier', - ['presentedSupplier' => &$supplierLazyArray] - ); +Hook::exec('actionPresentSupplier', ['presentedSupplier' => &$supplierLazyArray] ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductAdd.md b/modules/concepts/hooks/list-of-hooks/actionProductAdd.md index b8aa01dae2..540f4b55fe 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductAdd.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductAdd.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionProductAdd +hookAliases: + - addproduct array_return: false check_exceptions: false chain: false @@ -23,8 +24,5 @@ description: 'This hook is displayed after a product is created' ## Call of the Hook in the origin file ```php -$this->hookDispatcher->dispatchWithParameters( - 'actionProductAdd', - ['id_product_old' => $oldProductId, 'id_product' => $newProductId, 'product' => $newProduct] - ); +'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 f3ecf493e2..3a2ce3f056 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductAttributeDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductAttributeDelete.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionProductAttributeDelete +hookAliases: + - deleteProductAttribute array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 b1687f6fd2..dda63d719d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductAttributeUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductAttributeUpdate.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionProductAttributeUpdate +hookAliases: + - updateProductAttribute array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 ca4ff49c02..48a68caf3e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductCancel.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductCancel.md @@ -6,10 +6,20 @@ files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/CancelOrderProductHandler.php' file: src/Adapter/Order/CommandHandler/CancelOrderProductHandler.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/IssuePartialRefundHandler.php' + file: src/Adapter/Order/CommandHandler/IssuePartialRefundHandler.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/IssueReturnProductHandler.php' + file: src/Adapter/Order/CommandHandler/IssueReturnProductHandler.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Order/CommandHandler/IssueStandardRefundHandler.php' + file: src/Adapter/Order/CommandHandler/IssueStandardRefundHandler.php locations: - 'front office' type: action -hookAliases: actionProductCancel +hookAliases: + - cancelProduct array_return: false check_exceptions: true chain: false @@ -23,5 +33,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) $orderDetail->id_order_detail, 'cancel_quantity' => $qty_cancel_product, 'action' => CancellationActionType::CANCEL_PRODUCT], 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 6eb08c9eb6..5e3e9a0479 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductCoverage.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductCoverage.md @@ -1,7 +1,7 @@ --- Title: actionProductCoverage hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/stock/StockManager.php' @@ -23,12 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionProductCoverage', +'actionProductCoverage', [ '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 376ac4cc26..72cf3f0a83 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductDelete.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionProductDelete +hookAliases: + - deleteproduct array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 5bfde0a4cc..bd9f2b80f4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductOutOfStock.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductOutOfStock.md @@ -11,12 +11,11 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/product.tpl file: themes/hummingbird/templates/catalog/product.tpl - locations: - front office type: action hookAliases: - - actionProductOutOfStock + - productOutOfStock origin: theme array_return: false check_exceptions: false @@ -30,5 +29,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 1309d64c8d..e4e0777635 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductPriceCalculation.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductPriceCalculation.md @@ -23,31 +23,5 @@ description: 'This hook is called into the priceCalculation method to be able to ## Call of the Hook in the origin file ```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, - ]); +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, ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionProductSave.md b/modules/concepts/hooks/list-of-hooks/actionProductSave.md index dc97a9fb47..b29559ec86 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductSave.md @@ -9,7 +9,8 @@ files: locations: - 'front office' type: action -hookAliases: actionProductSave +hookAliases: + - afterSaveProduct array_return: false check_exceptions: false chain: false @@ -23,5 +24,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 bd5ffb0632..3fbdcb0be8 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductSearchAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductSearchAfter.md @@ -4,9 +4,8 @@ hidden: true hookTitle: 'Event triggered after search product completed' files: - - module: blockwishlist - url: 'https://github.com/PrestaShop/blockwishlist/blob/master/controllers/front/view.php' - file: 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: action @@ -24,5 +23,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 019253b5fe..7b4db8e89c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryAfter.md @@ -23,8 +23,5 @@ description: 'Required to return a previous state of an SQL query or/and to chan ## Call of the Hook in the origin file ```php -Hook::exec('actionProductSearchProviderRunQueryAfter', [ - 'query' => $query, - 'result' => $result, - ]); +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 33a5721eba..df6d51d2be 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductSearchProviderRunQueryBefore.md @@ -23,7 +23,5 @@ description: 'Required to modify an SQL query before executing it' ## Call of the Hook in the origin file ```php -Hook::exec('actionProductSearchProviderRunQueryBefore', [ - 'query' => $query, - ]); +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 ba0d9bd700..d0053a092b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductUpdate.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductUpdate.md @@ -6,10 +6,14 @@ files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/webservice/WebserviceSpecificManagementImages.php' + file: classes/webservice/WebserviceSpecificManagementImages.php locations: - 'back office' type: action -hookAliases: actionProductUpdate +hookAliases: + - updateproduct array_return: false check_exceptions: false chain: false @@ -23,5 +27,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) $this->id, 'product' => $this]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionSearch.md b/modules/concepts/hooks/list-of-hooks/actionSearch.md index d174284a88..de3dc89327 100644 --- a/modules/concepts/hooks/list-of-hooks/actionSearch.md +++ b/modules/concepts/hooks/list-of-hooks/actionSearch.md @@ -1,7 +1,7 @@ --- Title: actionSearch hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Search/SearchProductSearchProvider.php' @@ -33,11 +33,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionSearch', [ - 'searched_query' => $queryString, - 'total' => $count, - - // deprecated since 1.7.x - 'expr' => $queryString, - ]); +Hook::exec('actionSearch', [ 'searched_query' => $queryString, 'total' => $count, // 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 8f3457b44d..1bd38ecd2e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionSetInvoice.md +++ b/modules/concepts/hooks/list-of-hooks/actionSetInvoice.md @@ -1,7 +1,7 @@ --- Title: actionSetInvoice hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/Order.php' @@ -34,9 +34,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionSetInvoice', [ - get_class($this) => $this, - get_class($order_invoice) => $order_invoice, - 'use_existing_payment' => (bool) $use_existing_payment, - ]); +$invoice_number = 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 76259ec245..7e706987ec 100644 --- a/modules/concepts/hooks/list-of-hooks/actionShopDataDuplication.md +++ b/modules/concepts/hooks/list-of-hooks/actionShopDataDuplication.md @@ -1,11 +1,14 @@ --- Title: actionShopDataDuplication hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/shop/Shop.php' file: classes/shop/Shop.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminShopController.php' + file: controllers/admin/AdminShopController.php locations: - 'front office' type: action @@ -33,8 +36,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionShopDataDuplication', [ - 'old_id_shop' => (int) $old_id, - 'new_id_shop' => (int) $this->id, - ], $m['id_module']); +$modules_list = Hook::getHookModuleExecList('actionShopDataDuplication') ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionSubmitAccountBefore.md b/modules/concepts/hooks/list-of-hooks/actionSubmitAccountBefore.md index 25693e801a..767b9d0a04 100644 --- a/modules/concepts/hooks/list-of-hooks/actionSubmitAccountBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionSubmitAccountBefore.md @@ -3,13 +3,17 @@ Title: actionSubmitAccountBefore hidden: true hookTitle: 'Before customer account creation' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/CheckoutPersonalInformationStep.php' + file: classes/checkout/CheckoutPersonalInformationStep.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: actionSubmitAccountBefore +hookAliases: + - actionBeforeSubmitAccount array_return: true check_exceptions: false chain: false @@ -23,5 +27,5 @@ description: 'This hook is called before a customer account creation' ## Call of the Hook in the origin file ```php -Hook::exec('actionSubmitAccountBefore', [], null, true); +Hook::exec('actionSubmitAccountBefore', [], null, true), function ($carry, $item) { return $carry && $item; }, true ) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md b/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md index 2757202893..8155118270 100644 --- a/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md +++ b/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md @@ -1,7 +1,7 @@ --- Title: actionSubmitCustomerAddressForm hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerAddressForm.php' @@ -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 d73a270891..0a60fc069d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionUpdateCartAddress.md +++ b/modules/concepts/hooks/list-of-hooks/actionUpdateCartAddress.md @@ -23,5 +23,5 @@ description: 'This hook is called after address is changed on the cart' ## Call of the Hook in the origin file ```php -Hook::exec('actionUpdateCartAddress', ['cart' => $this, 'oldAddressId' => $currentAddressId, 'newAddressId' => $newAddressId]); +Hook::exec('actionUpdateCartAddress', ['cart' => $this, 'oldAddressId' => (int) $id_address, 'newAddressId' => (int) $id_address_new]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionUpdateLangAfter.md b/modules/concepts/hooks/list-of-hooks/actionUpdateLangAfter.md index 9244238862..47deb7deb3 100644 --- a/modules/concepts/hooks/list-of-hooks/actionUpdateLangAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionUpdateLangAfter.md @@ -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 aefe8ce4bc..4d7ccf829d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionUpdateQuantity.md +++ b/modules/concepts/hooks/list-of-hooks/actionUpdateQuantity.md @@ -3,13 +3,23 @@ Title: actionUpdateQuantity hidden: true hookTitle: 'Quantity update' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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 + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Stock/Update/ProductStockUpdater.php' + file: src/Adapter/Product/Stock/Update/ProductStockUpdater.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Stock/StockManager.php' + file: src/Core/Stock/StockManager.php locations: - 'front office' type: action -hookAliases: actionUpdateQuantity +hookAliases: + - updateQuantity array_return: false check_exceptions: false chain: false @@ -23,12 +33,10 @@ description: 'Quantity is updated only when a customer effectively places their ## Call of the Hook in the origin file ```php -$this->hookDispatcher->dispatchWithParameters('actionUpdateQuantity', +'actionUpdateQuantity', [ - 'id_product' => $stockAvailable->id_product, - 'id_product_attribute' => $stockAvailable->id_product_attribute, - 'quantity' => $stockAvailable->quantity, - 'delta_quantity' => $deltaQuantity, - 'id_shop' => $stockAvailable->id_shop, - ]); + 'id_product' => $id_product, + 'id_product_attribute' => $id_product_attribute, + 'quantity' => $stock_available->quantity, + 'delta_quantity' => $deltaQuantity ?? null, ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateCartRule.md b/modules/concepts/hooks/list-of-hooks/actionValidateCartRule.md index 43a312cc55..41c5b746e1 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateCartRule.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateCartRule.md @@ -23,17 +23,10 @@ description: 'Allow modules to implement their own rules to validate a cart rule ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionValidateCartRule', +'actionValidateCartRule', [ 'cart_rule' => $this, 'cart' => $cart, 'alreadyInCart' => $alreadyInCart, 'display_error' => $display_error, - 'check_carrier' => $check_carrier, - 'useOrderPrices' => $useOrderPrices, - 'isValidatedByModules' => &$isValidatedByModules, - 'isValidatedByModulesError' => &$isValidatedByModulesError, - ] - ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateCustomerAddressForm.md b/modules/concepts/hooks/list-of-hooks/actionValidateCustomerAddressForm.md index 7dd710a63e..719bd93f8c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateCustomerAddressForm.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateCustomerAddressForm.md @@ -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]); +if ($is_valid && Hook::exec('actionValidateCustomerAddressForm', ['form' => $this]) === false) { $is_valid = false; } return $is_valid && parent::validate() ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateOrder.md b/modules/concepts/hooks/list-of-hooks/actionValidateOrder.md index 5b00d31f0a..78bd570688 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateOrder.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateOrder.md @@ -38,13 +38,7 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('actionValidateOrder', [ - 'cart' => $this->context->cart, - 'order' => $order, - 'customer' => $this->context->customer, - 'currency' => $this->context->currency, - 'orderStatus' => $order_status, - ]); +Hook::exec('actionValidateOrder', [ 'cart' => $this->context->cart, 'order' => $order, '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 f121998c5f..36d7601dde 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateOrderAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateOrderAfter.md @@ -37,15 +37,10 @@ description: 'This hook is called after validating an order by core' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionValidateOrderAfter', +'actionValidateOrderAfter', [ 'cart' => $this->context->cart, 'order' => $order ?? null, 'orders' => $order_list, 'customer' => $this->context->customer, - '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 17159cc1f0..60c4c020ba 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateOrderBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateOrderBefore.md @@ -23,11 +23,5 @@ description: 'This hook is called before validating an order by core' ## Call of the Hook in the origin file ```php -Hook::exec('actionValidateOrderBefore', [ - 'cart' => $this->context->cart, - 'customer' => $this->context->customer, - 'currency' => $this->context->currency, - 'id_order_state' => &$id_order_state, - 'payment_method' => $payment_method, - ]); +Hook::exec('actionValidateOrderBefore', [ 'cart' => $this->context->cart, 'customer' => $this->context->customer, 'currency' => $this->context->currency, 'id_order_state' => &$id_order_state, 'payment_method' => $payment_method, ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md b/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md index 585f6924ca..c57d2e006a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md @@ -1,7 +1,7 @@ --- Title: actionValidateStepComplete hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/CheckoutDeliveryStep.php' @@ -34,13 +34,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'actionValidateStepComplete', +'actionValidateStepComplete', [ 'step_name' => 'delivery', 'request_params' => $requestParams, '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 52bcb67285..7739fe5b84 100644 --- a/modules/concepts/hooks/list-of-hooks/actionWatermark.md +++ b/modules/concepts/hooks/list-of-hooks/actionWatermark.md @@ -3,13 +3,23 @@ Title: actionWatermark hidden: true hookTitle: 'Watermark' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ImageManager.php' + file: classes/ImageManager.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/webservice/WebserviceSpecificManagementImages.php' + file: classes/webservice/WebserviceSpecificManagementImages.php - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Import/ImageCopier.php' file: src/Adapter/Import/ImageCopier.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Image/Uploader/ProductImageUploader.php' + file: src/Adapter/Product/Image/Uploader/ProductImageUploader.php locations: - 'front office' type: action -hookAliases: actionWatermark +hookAliases: + - watermark array_return: false check_exceptions: false chain: false @@ -23,11 +33,5 @@ description: '' ## Call of the Hook in the origin file ```php -$this->hookDispatcher->dispatchWithParameters( - 'actionWatermark', - [ - 'id_image' => $imageId, - 'id_product' => $entityId, - ] - ); +Hook::exec('actionWatermark', ['id_image' => $id_image, 'id_product' => $id_entity]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md b/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md index 7dec0d939e..7f5b49d041 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: 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 c0d5d0b48f..ff99cc2d9a 100644 --- a/modules/concepts/hooks/list-of-hooks/addWebserviceResources.md +++ b/modules/concepts/hooks/list-of-hooks/addWebserviceResources.md @@ -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); +$extra_resources = 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 4b3dd0cdc6..8b7443499f 100644 --- a/modules/concepts/hooks/list-of-hooks/additionalCustomerAddressFields.md +++ b/modules/concepts/hooks/list-of-hooks/additionalCustomerAddressFields.md @@ -6,6 +6,10 @@ files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerAddressFormatter.php' file: classes/form/CustomerAddressFormatter.php + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/customer/_partials/block-address.tpl + file: themes/classic/templates/customer/_partials/block-address.tpl locations: - 'front office' type: action @@ -23,5 +27,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); +$additionalAddressFormFields = 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 faac2f248b..2bce89e77e 100644 --- a/modules/concepts/hooks/list-of-hooks/additionalCustomerFormFields.md +++ b/modules/concepts/hooks/list-of-hooks/additionalCustomerFormFields.md @@ -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); +$additionalCustomerFormFields = 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 b7551b1d8e..ab1520c30c 100644 --- a/modules/concepts/hooks/list-of-hooks/dashboardData.md +++ b/modules/concepts/hooks/list-of-hooks/dashboardData.md @@ -1,7 +1,7 @@ --- Title: dashboardData hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('dashboardData', $params, $id_module, true); +private const DASHBOARD_ALLOWED_HOOKS = ['dashboardData', 'dashboardZoneOne', 'dashboardZoneTwo', 'displayDashboardToolbarIcons', 'displayDashboardToolbarTopMenu', 'displayDashboardTop']; + + public function __construct() + { + $this->bootstrap = true; + $this->display = 'view'; ``` diff --git a/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md b/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md index 55ae193b21..ca300a6868 100644 --- a/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md +++ b/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md @@ -1,7 +1,7 @@ --- Title: dashboardZoneOne hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('dashboardZoneOne', $params); +private const DASHBOARD_ALLOWED_HOOKS = ['dashboardData', 'dashboardZoneOne', 'dashboardZoneTwo', 'displayDashboardToolbarIcons', 'displayDashboardToolbarTopMenu', 'displayDashboardTop']; + + public function __construct() + { + $this->bootstrap = true; + $this->display = 'view'; ``` diff --git a/modules/concepts/hooks/list-of-hooks/dashboardZoneThree.md b/modules/concepts/hooks/list-of-hooks/dashboardZoneThree.md index 1da504a372..52c31d0d19 100644 --- a/modules/concepts/hooks/list-of-hooks/dashboardZoneThree.md +++ b/modules/concepts/hooks/list-of-hooks/dashboardZoneThree.md @@ -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); +'hookDashboardZoneThree' => Hook::exec('dashboardZoneThree', $params), 'action' => '#', 'warning' => $this->getWarningDomainName(), 'calendar' => $calendar_helper->generate(), 'PS_DASHBOARD_SIMULATION' => Configuration::get('PS_DASHBOARD_SIMULATION'), 'datepickerFrom' => Tools::getValue('datepickerFrom', $this->context->employee->stats_date_from), ``` diff --git a/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md b/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md index c0326e0ea1..472e44fdd4 100644 --- a/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md +++ b/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md @@ -1,7 +1,7 @@ --- Title: dashboardZoneTwo hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' @@ -23,5 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('dashboardZoneTwo', $params); +private const DASHBOARD_ALLOWED_HOOKS = ['dashboardData', 'dashboardZoneOne', 'dashboardZoneTwo', 'displayDashboardToolbarIcons', 'displayDashboardToolbarTopMenu', 'displayDashboardTop']; + + public function __construct() + { + $this->bootstrap = true; + $this->display = 'view'; ``` diff --git a/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md b/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md index ff46d2cc0f..c95da7dd30 100644 --- a/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md +++ b/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md @@ -1,7 +1,7 @@ --- Title: deleteProductAttribute hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' @@ -9,7 +9,7 @@ files: locations: - 'front office' type: action -hookAliases: deleteProductAttribute +hookAliases: array_return: false check_exceptions: false chain: false @@ -23,12 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'deleteProductAttribute', +'deleteProductAttribute', [ 'id_product_attribute' => $id_product_attribute, '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 0a51cc8fff..43670b9b42 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdditionalCustomerAddressFields.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdditionalCustomerAddressFields.md @@ -3,15 +3,14 @@ Title: displayAdditionalCustomerAddressFields hidden: true hookTitle: 'Display additional customer address fields' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/customer/_partials/block-address.tpl - file: themes/classic/templates/customer/_partials/block-address.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/customer/_partials/block-address.tpl file: themes/hummingbird/templates/customer/_partials/block-address.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/customer/_partials/block-address.tpl + file: themes/classic/templates/customer/_partials/block-address.tpl locations: - front office type: display @@ -29,5 +28,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}; +{capture name='displayAdditionalCustomerAddressFields'}{hook h='displayAdditionalCustomerAddressFields' address=$address}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAddressSelectorBottom.md b/modules/concepts/hooks/list-of-hooks/displayAddressSelectorBottom.md index e9ce834762..5e56a6417b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAddressSelectorBottom.md +++ b/modules/concepts/hooks/list-of-hooks/displayAddressSelectorBottom.md @@ -4,9 +4,13 @@ hidden: true hookTitle: 'After address selection on checkout page' files: - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/steps/addresses.tpl' - file: 'Classic Theme: templates/checkout/_partials/steps/addresses.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/steps/addresses.tpl + file: themes/hummingbird/templates/checkout/_partials/steps/addresses.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/steps/addresses.tpl + file: themes/classic/templates/checkout/_partials/steps/addresses.tpl locations: - 'front office' type: display @@ -25,5 +29,5 @@ description: '' ## Call of the Hook in the origin file ```php -{hook h='displayAddressSelectorBottom'}; +{capture name="address_selector_bottom"}{hook h='displayAddressSelectorBottom'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md b/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md index dc7a1253b0..9076c42447 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md @@ -1,8 +1,20 @@ --- Title: displayAdminAfterHeader hidden: true -hookTitle: '' +hookTitle: files: files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/header.tpl' + file: admin-dev/themes/default/template/header.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/new-theme/template/layout.tpl' + file: admin-dev/themes/new-theme/template/layout.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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/default_layout.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Layout/default_layout.html.twig - 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 @@ -23,5 +35,5 @@ description: '' ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminAfterHeader', {}) }}; +{hook h='displayAdminAfterHeader'} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminCustomers.md b/modules/concepts/hooks/list-of-hooks/displayAdminCustomers.md index dea8f2d1c9..cd9a7277dd 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminCustomers.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminCustomers.md @@ -33,5 +33,10 @@ 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}) }} + +{% endblock %} + +{% block javascripts %} + {{ parent() }} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminEndContent.md b/modules/concepts/hooks/list-of-hooks/displayAdminEndContent.md index f3bf421f86..28504c53df 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminEndContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminEndContent.md @@ -3,6 +3,18 @@ Title: displayAdminEndContent hidden: true hookTitle: 'Administration end of content' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/footer.tpl' + file: admin-dev/themes/default/template/footer.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/new-theme/template/layout.tpl' + file: admin-dev/themes/new-theme/template/layout.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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/default_layout.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Layout/default_layout.html.twig - 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 @@ -23,5 +35,5 @@ description: 'This hook is displayed at the end of the main content, before the ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminEndContent', {}) }}; +{hook h='displayAdminEndContent'} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminForm.md b/modules/concepts/hooks/list-of-hooks/displayAdminForm.md index d4a3a9b6e4..40b623a7a5 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminForm.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminForm.md @@ -1,7 +1,7 @@ --- Title: displayAdminForm hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/form/form.tpl' @@ -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 61ba5eabf0..35b1adbe71 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminGridTableAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminGridTableAfter.md @@ -38,7 +38,7 @@ description: 'This hook adds new blocks after Grid component table' {{ renderhook('displayAdminGridTableAfter', { grid: grid, legacy_controller: app.request.attributes.get('_legacy_controller'), - controller: app.request.attributes.get('_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 d88ba89d41..cdc2e94cd9 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminGridTableBefore.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminGridTableBefore.md @@ -38,7 +38,7 @@ description: 'This hook adds new blocks before Grid component table' {{ renderhook('displayAdminGridTableBefore', { grid: grid, legacy_controller: app.request.attributes.get('_legacy_controller'), - controller: app.request.attributes.get('_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 58a71f4bc3..549dfeee62 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminListAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminListAfter.md @@ -1,15 +1,21 @@ --- Title: displayAdminListAfter hidden: true -hookTitle: '' +hookTitle: files: files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/controllers/countries/helpers/list/list_footer.tpl' + file: admin-dev/themes/default/template/controllers/countries/helpers/list/list_footer.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_footer.tpl' + file: admin-dev/themes/default/template/controllers/tax_rules/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: displayAdminListAfter +hookAliases: array_return: false check_exceptions: false chain: false @@ -23,5 +29,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 e508ffdaa2..dcd2e57f70 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminListBefore.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminListBefore.md @@ -1,15 +1,18 @@ --- Title: displayAdminListBefore hidden: true -hookTitle: '' +hookTitle: files: files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_header.tpl' + file: admin-dev/themes/default/template/controllers/tax_rules/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: displayAdminListBefore +hookAliases: array_return: false check_exceptions: false chain: false @@ -23,5 +26,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 eef64afce3..e7207ac778 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminLogin.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminLogin.md @@ -3,6 +3,9 @@ Title: displayAdminLogin hidden: true hookTitle: '' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' + file: classes/Hook.php - 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 @@ -23,5 +26,10 @@ description: '' ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminLogin') }}; +'displayAdminLogin', + ]); + + if ($useCache && Cache::isStored($cache_id)) { + return Cache::retrieve($cache_id); + } ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md b/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md index 1d7f9e9926..e1a5b00c79 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md @@ -1,8 +1,17 @@ --- Title: displayAdminNavBarBeforeEnd hidden: true -hookTitle: '' +hookTitle: files: files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/nav.tpl' + file: admin-dev/themes/default/template/nav.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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/Layout/nav_bar.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/Layout/nav_bar.html.twig - 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 @@ -23,5 +32,5 @@ description: '' ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminNavBarBeforeEnd') }}; +{hook h='displayAdminNavBarBeforeEnd'} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md b/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md index d31e39eb9f..8b32dfb4fd 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md @@ -1,7 +1,7 @@ --- Title: displayAdminOptions hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/options/options.tpl' @@ -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 f2cc2bc8d4..4d4951b721 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrder.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrder.md @@ -9,7 +9,9 @@ files: locations: - 'back office' type: display -hookAliases: displayAdminOrder +hasExample: true +hookAliases: + - adminOrder array_return: false check_exceptions: false chain: false @@ -32,7 +34,12 @@ 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}) }} + + {{ include('@PrestaShop/Admin/Sell/Order/Order/Blocks/View/Modal/add_order_discount_modal.html.twig') }} + {{ include('@PrestaShop/Admin/Sell/Order/Order/Blocks/View/Modal/update_shipping_modal.html.twig') }} + {{ include('@PrestaShop/Admin/Sell/Order/Order/Blocks/View/Modal/split_shipment_modal.html.twig') }} + {{ include('@PrestaShop/Admin/Sell/Order/Order/Blocks/View/Modal/edit_shipping_modal.html.twig') }} ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOrderCreateExtraButtons.md b/modules/concepts/hooks/list-of-hooks/displayAdminOrderCreateExtraButtons.md index e03efea51f..2009ab3682 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderCreateExtraButtons.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderCreateExtraButtons.md @@ -23,5 +23,10 @@ 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 1abfe75eef..a7202dd008 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderMain.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderMain.md @@ -33,7 +33,11 @@ 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}) }} + {{ include('@PrestaShop/Admin/Sell/Order/Order/Blocks/View/payments.html.twig') }} + {{ renderhook('displayAdminOrderMainBottom', {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 c9692e48af..2767353571 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderMainBottom.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderMainBottom.md @@ -32,5 +32,10 @@ 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}) }} + + + + {% if orderForViewing.sources.sources is not empty %} +
``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOrderSide.md b/modules/concepts/hooks/list-of-hooks/displayAdminOrderSide.md index 610d9f20bc..507232ebca 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderSide.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderSide.md @@ -10,7 +10,7 @@ locations: - 'back office' type: display hookAliases: - - displayBackofficeOrderActions + - displayBackOfficeOrderActions array_return: false check_exceptions: false chain: false @@ -33,5 +33,10 @@ 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}) }} + {{ include('@PrestaShop/Admin/Sell/Order/Order/Blocks/View/messages.html.twig') }} + {{ renderhook('displayAdminOrderSideBottom', {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 02fdee5d27..d3534d0cda 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderSideBottom.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderSideBottom.md @@ -1,7 +1,7 @@ --- Title: displayAdminOrderSideBottom hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' @@ -33,7 +33,12 @@ description: '' ## Call of the Hook in the origin file ```php -{{ renderhook('displayAdminOrderSideBottom', {id_order: orderForViewing.id}) }}; +{{ renderhook('displayAdminOrderSideBottom', {id_order: orderForViewing.id}) }} +
+ +
+
+ {{ include('@PrestaShop/Admin/Sell/Order/Order/Blocks/View/products.html.twig') }} ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminStatsModules.md b/modules/concepts/hooks/list-of-hooks/displayAdminStatsModules.md index 32bffc3fa3..7e7ee3e76a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminStatsModules.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminStatsModules.md @@ -8,8 +8,9 @@ files: file: controllers/admin/AdminStatsTabController.php locations: - 'back office' -type: action -hookAliases: displayAdminStatsModules +type: display +hookAliases: + - AdminStatsModules array_return: false check_exceptions: false chain: false @@ -23,5 +24,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('displayAdminStatsModules', [], $module_instance->id); +$moduleList = Hook::getHookModuleExecList('displayAdminStatsModules'); + if (true === is_array($moduleList)) { + return array_map( + function ($moduleArray) { + return ['name' => $moduleArray['module']]; + }, ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminThemesListAfter.md b/modules/concepts/hooks/list-of-hooks/displayAdminThemesListAfter.md index c575da2abc..eda1af1c69 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminThemesListAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminThemesListAfter.md @@ -32,5 +32,9 @@ 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')}) }} + + {{ include('@PrestaShop/Admin/Improve/Design/Theme/Blocks/layouts_configuration.html.twig') }} +
+
``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminView.md b/modules/concepts/hooks/list-of-hooks/displayAdminView.md index 725595ac59..21dec66ab7 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminView.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminView.md @@ -1,7 +1,7 @@ --- Title: displayAdminView hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/view/view.tpl' @@ -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 fdfbc6cf9a..ba4351fb1b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAfterBodyOpeningTag.md +++ b/modules/concepts/hooks/list-of-hooks/displayAfterBodyOpeningTag.md @@ -3,15 +3,14 @@ Title: displayAfterBodyOpeningTag hidden: true hookTitle: 'Very top of pages' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl - file: themes/classic/templates/layouts/layout-both-columns.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-both-columns.tpl file: themes/hummingbird/templates/layouts/layout-both-columns.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/classic/templates/layouts/layout-both-columns.tpl locations: - front office type: display @@ -29,5 +28,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 93267eb973..c7ddfddbe1 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAfterCarrier.md +++ b/modules/concepts/hooks/list-of-hooks/displayAfterCarrier.md @@ -8,7 +8,7 @@ files: file: classes/checkout/CheckoutDeliveryStep.php locations: - 'front office' -type: action +type: display 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()]); +'hookDisplayAfterCarrier' => Hook::exec('displayAfterCarrier', ['cart' => $this->getCheckoutSession()->getCart()]), 'id_address' => $this->getCheckoutSession()->getIdAddressDelivery(), 'delivery_options' => $this->getCheckoutSession()->getDeliveryOptions(), 'delivery_option' => $this->getCheckoutSession()->getSelectedDeliveryOption(), 'recyclable' => $this->getCheckoutSession()->isRecyclable(), 'recyclablePackAllowed' => $this->isRecyclablePackAllowed(), ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayAfterProductThumbs.md b/modules/concepts/hooks/list-of-hooks/displayAfterProductThumbs.md index 04dbefddab..3f98e77a43 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAfterProductThumbs.md +++ b/modules/concepts/hooks/list-of-hooks/displayAfterProductThumbs.md @@ -11,7 +11,6 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/_partials/product-cover-thumbnails.tpl file: themes/hummingbird/templates/catalog/_partials/product-cover-thumbnails.tpl - locations: - front office type: display @@ -29,5 +28,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 22026daf24..9093a56046 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAfterTitleTag.md +++ b/modules/concepts/hooks/list-of-hooks/displayAfterTitleTag.md @@ -3,15 +3,14 @@ Title: displayAfterTitleTag hidden: true hookTitle: 'After title tag' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/head.tpl - file: themes/classic/templates/_partials/head.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/head.tpl file: themes/hummingbird/templates/_partials/head.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/head.tpl + file: themes/classic/templates/_partials/head.tpl locations: - front office type: display @@ -29,5 +28,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 dd684b831b..c330b82850 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/9.1.x/src/PrestaShopBundle/Twig/Component/EmployeeDropdown.php' - file: src/PrestaShopBundle/Twig/Component/EmployeeDropdown.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Bridge/Smarty/HeaderConfigurator.php' + file: src/PrestaShopBundle/Bridge/Smarty/HeaderConfigurator.php locations: - 'back office' type: display @@ -32,10 +32,10 @@ description: 'This hook is displayed in the employee menu' ## Call of the Hook in the origin file ```php -$this->hookDispatcher->dispatchWithParameters( - 'displayBackOfficeEmployeeMenu', - [ - 'links' => $menuLinksCollections, - ] - ); +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 d17f59d9e4..499cc24263 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBackOfficeFooter.md +++ b/modules/concepts/hooks/list-of-hooks/displayBackOfficeFooter.md @@ -3,13 +3,26 @@ Title: displayBackOfficeFooter hidden: true hookTitle: 'Administration panel footer' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/footer.tpl' + file: admin-dev/themes/default/template/footer.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/new-theme/template/footer.tpl' + file: admin-dev/themes/new-theme/template/footer.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' + file: classes/Hook.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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 -hookAliases: displayBackOfficeFooter +hookAliases: + - backOfficeFooter array_return: false check_exceptions: false chain: false @@ -23,5 +36,5 @@ description: 'This hook is displayed within the admin panel''s footer' ## Call of the Hook in the origin file ```php -{{ renderhook('displayBackOfficeFooter', {}) }}; +{hook h="displayBackOfficeFooter"} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayBackOfficeHeader.md b/modules/concepts/hooks/list-of-hooks/displayBackOfficeHeader.md index 3744e7f283..0ad27ded0f 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBackOfficeHeader.md +++ b/modules/concepts/hooks/list-of-hooks/displayBackOfficeHeader.md @@ -3,13 +3,23 @@ Title: displayBackOfficeHeader hidden: true hookTitle: 'Administration panel header' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' + file: classes/Hook.php - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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/Component/Layout/head_tag.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/Layout/head_tag.html.twig + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/head_tag.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/LegacyLayout/head_tag.html.twig locations: - 'back office' -type: action -hookAliases: displayBackOfficeHeader +type: display +hookAliases: + - backOfficeHeader array_return: false check_exceptions: false chain: false @@ -23,5 +33,10 @@ description: 'This hook is displayed in the header of the admin panel' ## Call of the Hook in the origin file ```php -Hook::exec('displayBackOfficeHeader'); +'displayBackOfficeHeader', + 'displayAdminLogin', + ]); + + if ($useCache && Cache::isStored($cache_id)) { + return Cache::retrieve($cache_id); ``` \ 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 c37edd441b..28cf676a8b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBackOfficeTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayBackOfficeTop.md @@ -3,13 +3,20 @@ Title: displayBackOfficeTop hidden: true hookTitle: 'Administration panel hover the tabs' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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/default_layout.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Layout/default_layout.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 -hookAliases: displayBackOfficeTop +hookAliases: + - backOfficeTop array_return: false check_exceptions: false chain: false @@ -23,5 +30,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 -{{ renderhook('displayBackOfficeTop') }}; +'displayBackOfficeTop' => Hook::exec('displayBackOfficeTop'), 'displayBackOfficeEmployeeMenu' => $menuLinksCollections, 'submit_form_ajax' => (int) Tools::getValue('submitFormAjax'), ]) ``` \ 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 9bb3c52957..e7715197f7 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBanner.md +++ b/modules/concepts/hooks/list-of-hooks/displayBanner.md @@ -3,15 +3,14 @@ Title: displayBanner hidden: true hookTitle: 'Very top of pages' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/header.tpl - file: themes/classic/templates/_partials/header.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/header.tpl file: themes/hummingbird/templates/_partials/header.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/header.tpl + file: themes/classic/templates/_partials/header.tpl locations: - front office type: display @@ -29,5 +28,5 @@ description: Use this hook for banners on top of every pages ## Call of the Hook in the origin file ```php -{hook h='displayBanner'}; +{capture name="header_banner"}{hook h='displayBanner'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayBeforeBodyClosingTag.md b/modules/concepts/hooks/list-of-hooks/displayBeforeBodyClosingTag.md index 382fa6f812..e7c3246be1 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBeforeBodyClosingTag.md +++ b/modules/concepts/hooks/list-of-hooks/displayBeforeBodyClosingTag.md @@ -3,15 +3,14 @@ Title: displayBeforeBodyClosingTag hidden: true hookTitle: 'Very bottom of pages' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl - file: themes/classic/templates/layouts/layout-both-columns.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-both-columns.tpl file: themes/hummingbird/templates/layouts/layout-both-columns.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/classic/templates/layouts/layout-both-columns.tpl locations: - front office type: display @@ -29,5 +28,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 9a838dae14..2b8993ba6b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBeforeCarrier.md +++ b/modules/concepts/hooks/list-of-hooks/displayBeforeCarrier.md @@ -8,8 +8,9 @@ files: file: classes/checkout/CheckoutDeliveryStep.php locations: - 'front office' -type: action -hookAliases: displayBeforeCarrier +type: display +hookAliases: + - beforeCarrier array_return: false check_exceptions: false chain: false @@ -23,5 +24,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()]); +'hookDisplayBeforeCarrier' => Hook::exec('displayBeforeCarrier', ['cart' => $this->getCheckoutSession()->getCart()]), 'hookDisplayAfterCarrier' => Hook::exec('displayAfterCarrier', ['cart' => $this->getCheckoutSession()->getCart()]), 'id_address' => $this->getCheckoutSession()->getIdAddressDelivery(), 'delivery_options' => $this->getCheckoutSession()->getDeliveryOptions(), 'delivery_option' => $this->getCheckoutSession()->getSelectedDeliveryOption(), 'recyclable' => $this->getCheckoutSession()->isRecyclable(), ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCMSDisputeInformation.md b/modules/concepts/hooks/list-of-hooks/displayCMSDisputeInformation.md index 9d09dc7f09..6eb88cbe2d 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCMSDisputeInformation.md +++ b/modules/concepts/hooks/list-of-hooks/displayCMSDisputeInformation.md @@ -1,17 +1,16 @@ --- Title: displayCMSDisputeInformation hidden: true -hookTitle: '' +hookTitle: displayCMSDisputeInformation files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/cms/page.tpl - file: themes/classic/templates/cms/page.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/cms/page.tpl file: themes/hummingbird/templates/cms/page.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/cms/page.tpl + file: themes/classic/templates/cms/page.tpl locations: - front office type: display @@ -29,5 +28,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 64dff50725..d87433c6e8 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCMSPrintButton.md +++ b/modules/concepts/hooks/list-of-hooks/displayCMSPrintButton.md @@ -1,17 +1,16 @@ --- Title: displayCMSPrintButton hidden: true -hookTitle: '' +hookTitle: displayCMSPrintButton files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/cms/page.tpl - file: themes/classic/templates/cms/page.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/cms/page.tpl file: themes/hummingbird/templates/cms/page.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/cms/page.tpl + file: themes/classic/templates/cms/page.tpl locations: - front office type: display @@ -29,5 +28,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 ece631051e..913ec04d5e 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCarrierExtraContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayCarrierExtraContent.md @@ -3,12 +3,15 @@ Title: displayCarrierExtraContent hidden: true hookTitle: 'Display additional content for a carrier (e.g pickup points)' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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: action +type: display hookAliases: array_return: false check_exceptions: false @@ -23,5 +26,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['instance']], Module::getModuleIdByName($carrier['instance']->id)); +$carrier['extraContent'] = Hook::exec('displayCarrierExtraContent', ['carrier' => $carrier], $moduleId) ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCartExtraProductActions.md b/modules/concepts/hooks/list-of-hooks/displayCartExtraProductActions.md index 070e793c5b..4446711355 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCartExtraProductActions.md +++ b/modules/concepts/hooks/list-of-hooks/displayCartExtraProductActions.md @@ -11,10 +11,9 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/cart-detailed-product-line.tpl file: themes/hummingbird/templates/checkout/_partials/cart-detailed-product-line.tpl - locations: - front office -type: action +type: display hookAliases: origin: theme array_return: false @@ -29,5 +28,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 11ea6993bb..ee9bc42baa 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCartModalContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayCartModalContent.md @@ -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 e39f7c737a..455632caa8 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCartModalFooter.md +++ b/modules/concepts/hooks/list-of-hooks/displayCartModalFooter.md @@ -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 70beb5c569..4f1b1b982b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCheckoutBeforeConfirmation.md +++ b/modules/concepts/hooks/list-of-hooks/displayCheckoutBeforeConfirmation.md @@ -3,15 +3,14 @@ Title: displayCheckoutBeforeConfirmation hidden: true hookTitle: 'Show custom content before checkout confirmation' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/steps/payment.tpl - file: themes/classic/templates/checkout/_partials/steps/payment.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/steps/payment.tpl file: themes/hummingbird/templates/checkout/_partials/steps/payment.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/steps/payment.tpl + file: themes/classic/templates/checkout/_partials/steps/payment.tpl locations: - front office type: display @@ -29,5 +28,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 7a2b0f1079..1213928485 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCheckoutSubtotalDetails.md +++ b/modules/concepts/hooks/list-of-hooks/displayCheckoutSubtotalDetails.md @@ -1,25 +1,16 @@ --- Title: displayCheckoutSubtotalDetails hidden: true -hookTitle: '' +hookTitle: displayCheckoutSubtotalDetails files: - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/modules/ps_shoppingcart/modal.tpl - file: themes/classic/modules/ps_shoppingcart/modal.tpl + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/cart-detailed-totals.tpl + file: themes/hummingbird/templates/checkout/_partials/cart-detailed-totals.tpl - theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/cart-detailed-totals.tpl file: themes/classic/templates/checkout/_partials/cart-detailed-totals.tpl - - - theme: hummingbird - url: https://github.com/PrestaShop/hummingbird/blob/develop/modules/ps_shoppingcart/modal.tpl - file: themes/hummingbird/modules/ps_shoppingcart/modal.tpl - - - theme: hummingbird - url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/cart-detailed-totals.tpl - file: themes/hummingbird/templates/checkout/_partials/cart-detailed-totals.tpl - locations: - front office type: display @@ -37,5 +28,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 d76b05daa5..c59a7bcd82 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCheckoutSummaryTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayCheckoutSummaryTop.md @@ -3,15 +3,14 @@ Title: displayCheckoutSummaryTop hidden: true hookTitle: 'Cart summary top' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/cart-summary-top.tpl - file: themes/classic/templates/checkout/_partials/cart-summary-top.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/cart-summary-top.tpl file: themes/hummingbird/templates/checkout/_partials/cart-summary-top.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/cart-summary-top.tpl + file: themes/classic/templates/checkout/_partials/cart-summary-top.tpl locations: - front office type: display @@ -29,5 +28,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 fdb9d4ee74..c573f056c9 100644 --- a/modules/concepts/hooks/list-of-hooks/displayContactContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayContactContent.md @@ -3,15 +3,14 @@ Title: displayContactContent hidden: true hookTitle: 'Content wrapper section of the contact page' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/contact.tpl - file: themes/classic/templates/contact.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/contact.tpl file: themes/hummingbird/templates/contact.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/contact.tpl + file: themes/classic/templates/contact.tpl locations: - front office type: display @@ -29,5 +28,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 3e53cef91c..109d843dec 100644 --- a/modules/concepts/hooks/list-of-hooks/displayContactLeftColumn.md +++ b/modules/concepts/hooks/list-of-hooks/displayContactLeftColumn.md @@ -3,15 +3,14 @@ Title: displayContactLeftColumn hidden: true hookTitle: 'Left column blocks on the contact page' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/contact.tpl - file: themes/classic/templates/contact.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/contact.tpl file: themes/hummingbird/templates/contact.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/contact.tpl + file: themes/classic/templates/contact.tpl locations: - front office type: display @@ -29,5 +28,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 4e2c8446d4..f22da4f67e 100644 --- a/modules/concepts/hooks/list-of-hooks/displayContactRightColumn.md +++ b/modules/concepts/hooks/list-of-hooks/displayContactRightColumn.md @@ -3,15 +3,14 @@ Title: displayContactRightColumn hidden: true hookTitle: 'Right column blocks of the contact page' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/contact.tpl - file: themes/classic/templates/contact.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/contact.tpl file: themes/hummingbird/templates/contact.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/contact.tpl + file: themes/classic/templates/contact.tpl locations: - front office type: display @@ -29,5 +28,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 ac1ef263bb..e9004479f4 100644 --- a/modules/concepts/hooks/list-of-hooks/displayContentWrapperBottom.md +++ b/modules/concepts/hooks/list-of-hooks/displayContentWrapperBottom.md @@ -4,29 +4,53 @@ hidden: true hookTitle: 'Content wrapper section (bottom)' files: - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl' - file: 'Classic Theme: templates/layouts/layout-both-columns.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/index.tpl + file: themes/hummingbird/templates/index.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-content-only.tpl' - file: 'Classic Theme: templates/layouts/layout-content-only.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/hummingbird/templates/layouts/layout-both-columns.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-full-width.tpl' - file: 'Classic Theme: templates/layouts/layout-full-width.tpl' + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/classic/templates/layouts/layout-both-columns.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-left-column.tpl' - file: 'Classic Theme: templates/layouts/layout-left-column.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-content-only.tpl + file: themes/hummingbird/templates/layouts/layout-content-only.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-right-column.tpl' - file: 'Classic Theme: templates/layouts/layout-right-column.tpl' + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-content-only.tpl + file: themes/classic/templates/layouts/layout-content-only.tpl + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-full-width.tpl + file: themes/hummingbird/templates/layouts/layout-full-width.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-full-width.tpl + file: themes/classic/templates/layouts/layout-full-width.tpl + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-left-column.tpl + file: themes/hummingbird/templates/layouts/layout-left-column.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-left-column.tpl + file: themes/classic/templates/layouts/layout-left-column.tpl + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-right-column.tpl + file: themes/hummingbird/templates/layouts/layout-right-column.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-right-column.tpl + file: themes/classic/templates/layouts/layout-right-column.tpl locations: - 'front office' type: display -hookAliases: +hookAliases: origin: theme array_return: false check_exceptions: false @@ -40,5 +64,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 00ed42ba9d..31567b8f12 100644 --- a/modules/concepts/hooks/list-of-hooks/displayContentWrapperTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayContentWrapperTop.md @@ -4,29 +4,53 @@ hidden: true hookTitle: 'Content wrapper section (top)' files: - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl' - file: 'Classic Theme: templates/layouts/layout-both-columns.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/index.tpl + file: themes/hummingbird/templates/index.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-content-only.tpl' - file: 'Classic Theme: templates/layouts/layout-content-only.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/hummingbird/templates/layouts/layout-both-columns.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-full-width.tpl' - file: 'Classic Theme: templates/layouts/layout-full-width.tpl' + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/classic/templates/layouts/layout-both-columns.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-left-column.tpl' - file: 'Classic Theme: templates/layouts/layout-left-column.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-content-only.tpl + file: themes/hummingbird/templates/layouts/layout-content-only.tpl - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-right-column.tpl' - file: 'Classic Theme: templates/layouts/layout-right-column.tpl' + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-content-only.tpl + file: themes/classic/templates/layouts/layout-content-only.tpl + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-full-width.tpl + file: themes/hummingbird/templates/layouts/layout-full-width.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-full-width.tpl + file: themes/classic/templates/layouts/layout-full-width.tpl + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-left-column.tpl + file: themes/hummingbird/templates/layouts/layout-left-column.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-left-column.tpl + file: themes/classic/templates/layouts/layout-left-column.tpl + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-right-column.tpl + file: themes/hummingbird/templates/layouts/layout-right-column.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-right-column.tpl + file: themes/classic/templates/layouts/layout-right-column.tpl locations: - 'front office' type: display -hookAliases: +hookAliases: origin: theme array_return: false check_exceptions: false @@ -40,5 +64,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 e6054d01d0..a11fbfcea9 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCrossSellingShoppingCart.md +++ b/modules/concepts/hooks/list-of-hooks/displayCrossSellingShoppingCart.md @@ -1,17 +1,16 @@ --- Title: displayCrossSellingShoppingCart hidden: true -hookTitle: '' +hookTitle: displayCrossSellingShoppingCart files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/cart.tpl - file: themes/classic/templates/checkout/cart.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/cart.tpl file: themes/hummingbird/templates/checkout/cart.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/cart.tpl + file: themes/classic/templates/checkout/cart.tpl locations: - front office type: display @@ -29,5 +28,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 50d8c8264f..bb27654255 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomerAccount.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomerAccount.md @@ -3,10 +3,6 @@ Title: displayCustomerAccount hidden: true hookTitle: 'Customer account displayed in Front Office' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/customer/my-account.tpl - file: themes/classic/templates/customer/my-account.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/components/account-menu.tpl @@ -15,7 +11,10 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/customer/my-account.tpl file: themes/hummingbird/templates/customer/my-account.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/customer/my-account.tpl + file: themes/classic/templates/customer/my-account.tpl locations: - front office type: display @@ -34,5 +33,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 0c7985853e..3423f7a8bf 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomerAccountForm.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomerAccountForm.md @@ -8,8 +8,9 @@ files: file: classes/form/CustomerForm.php locations: - 'front office' -type: action -hookAliases: displayCustomerAccountForm +type: display +hookAliases: + - createAccountForm array_return: false check_exceptions: false chain: false @@ -23,5 +24,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_create_account_form' => Hook::exec('displayCustomerAccountForm'), 'formFields' => array_map( function (FormField $field) { return $field->toArray() ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCustomerAccountFormTop.md b/modules/concepts/hooks/list-of-hooks/displayCustomerAccountFormTop.md index efa21aa24b..6b4392b688 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomerAccountFormTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomerAccountFormTop.md @@ -8,8 +8,9 @@ files: file: controllers/front/RegistrationController.php locations: - 'front office' -type: action -hookAliases: displayCustomerAccountFormTop +type: display +hookAliases: + - createAccountTop array_return: false check_exceptions: false chain: false @@ -23,5 +24,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_create_account_top' => Hook::exec('displayCustomerAccountFormTop'), ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCustomerLoginFormAfter.md b/modules/concepts/hooks/list-of-hooks/displayCustomerLoginFormAfter.md index ee2651f982..46427140b6 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomerLoginFormAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomerLoginFormAfter.md @@ -3,15 +3,14 @@ Title: displayCustomerLoginFormAfter hidden: true hookTitle: 'Display elements after login form' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/customer/authentication.tpl - file: themes/classic/templates/customer/authentication.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/customer/authentication.tpl file: themes/hummingbird/templates/customer/authentication.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/customer/authentication.tpl + file: themes/classic/templates/customer/authentication.tpl locations: - front office type: display @@ -29,5 +28,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 8aeff4f154..80429fb591 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: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' file: classes/Product.php locations: - 'front office' -type: action +type: display 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']); +$row['value'] = 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 b91b049007..0b41740f38 100644 --- a/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarIcons.md +++ b/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarIcons.md @@ -4,8 +4,8 @@ hidden: true hookTitle: 'Display new elements in back office page with dashboard, on icons list' files: - - 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 + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' + file: controllers/admin/AdminDashboardController.php locations: - 'back office' type: display @@ -23,5 +23,10 @@ description: 'This hook launches modules when the back office with dashboard is ## Call of the Hook in the origin file ```php -{{ renderhook('displayDashboardToolbarIcons', {}) }} +private const DASHBOARD_ALLOWED_HOOKS = ['dashboardData', 'dashboardZoneOne', 'dashboardZoneTwo', 'displayDashboardToolbarIcons', 'displayDashboardToolbarTopMenu', 'displayDashboardTop']; + + public function __construct() + { + $this->bootstrap = true; + $this->display = 'view'; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarTopMenu.md b/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarTopMenu.md index 5a7d8eeb72..673eebea4d 100644 --- a/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarTopMenu.md +++ b/modules/concepts/hooks/list-of-hooks/displayDashboardToolbarTopMenu.md @@ -3,6 +3,18 @@ Title: displayDashboardToolbarTopMenu hidden: true hookTitle: 'Display new elements in back office page with a dashboard, on top Menu' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/page_header_toolbar.tpl' + file: admin-dev/themes/default/template/page_header_toolbar.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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/controllers/admin/AdminDashboardController.php' + file: controllers/admin/AdminDashboardController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Component/Layout/toolbar.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/Layout/toolbar.html.twig - 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 @@ -23,5 +35,5 @@ description: 'This hook launches modules when a page with a dashboard is display ## Call of the Hook in the origin file ```php -{{ renderhook('displayDashboardToolbarTopMenu') }}; +{hook h='displayDashboardToolbarTopMenu'} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayDashboardTop.md b/modules/concepts/hooks/list-of-hooks/displayDashboardTop.md index 1e5e515ea9..853a62712b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayDashboardTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayDashboardTop.md @@ -3,6 +3,18 @@ Title: displayDashboardTop hidden: true hookTitle: 'Dashboard Top' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/page_header_toolbar.tpl' + file: admin-dev/themes/default/template/page_header_toolbar.tpl + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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/controllers/admin/AdminDashboardController.php' + file: controllers/admin/AdminDashboardController.php + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Component/Layout/toolbar.html.twig' + file: src/PrestaShopBundle/Resources/views/Admin/Component/Layout/toolbar.html.twig - 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 @@ -23,5 +35,5 @@ description: 'Displays the content in the dashboard''s top area' ## Call of the Hook in the origin file ```php -{{ renderhook('displayDashboardTop') }}; +{hook h='displayDashboardTop'} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayEmptyModuleCategoryExtraMessage.md b/modules/concepts/hooks/list-of-hooks/displayEmptyModuleCategoryExtraMessage.md index 0fa4f1d98b..f02305b4a8 100644 --- a/modules/concepts/hooks/list-of-hooks/displayEmptyModuleCategoryExtraMessage.md +++ b/modules/concepts/hooks/list-of-hooks/displayEmptyModuleCategoryExtraMessage.md @@ -31,5 +31,10 @@ description: "This hook allows to add an extra message to display in the Module ## Call of the Hook in the origin file ```php -{{ renderhook('displayEmptyModuleCategoryExtraMessage', {'category_name': category.name}) }} +{% set hookData = renderhook('displayEmptyModuleCategoryExtraMessage', {category_name: category.name}) %} + {% if hookData is not empty %} +
+ {{ category.name|trans({}, 'Admin.Modules.Feature') }} +
+ {{ hookData|raw }} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayExpressCheckout.md b/modules/concepts/hooks/list-of-hooks/displayExpressCheckout.md index 8dee32aea8..1deffdf7ba 100644 --- a/modules/concepts/hooks/list-of-hooks/displayExpressCheckout.md +++ b/modules/concepts/hooks/list-of-hooks/displayExpressCheckout.md @@ -1,17 +1,16 @@ --- Title: displayExpressCheckout hidden: true -hookTitle: '' +hookTitle: displayExpressCheckout files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/cart-detailed-actions.tpl - file: themes/classic/templates/checkout/_partials/cart-detailed-actions.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/cart-detailed-actions.tpl file: themes/hummingbird/templates/checkout/_partials/cart-detailed-actions.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/cart-detailed-actions.tpl + file: themes/classic/templates/checkout/_partials/cart-detailed-actions.tpl locations: - front office type: display @@ -29,5 +28,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 9e49dfe460..781bc477cd 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.2.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Catalog/Features/Blocks/form.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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 ecb6177f37..8d829347ae 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.2.x/controllers/admin/AdminFeaturesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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 328fe6a72e..1359d1e801 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.2.x/admin-dev/themes/default/template/controllers/feature_value/helpers/form/form.tpl' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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 d19b2bed28..c4f9e89b72 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.2.x/controllers/admin/AdminFeaturesController.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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 a659a5d947..6b8a59f912 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFooter.md +++ b/modules/concepts/hooks/list-of-hooks/displayFooter.md @@ -3,15 +3,14 @@ Title: displayFooter hidden: true hookTitle: 'Footer' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/footer.tpl - file: themes/classic/templates/_partials/footer.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/footer.tpl file: themes/hummingbird/templates/_partials/footer.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/footer.tpl + file: themes/classic/templates/_partials/footer.tpl locations: - front office type: display @@ -30,5 +29,5 @@ description: This hook displays new blocks in the footer ## Call of the Hook in the origin file ```php -{hook h='displayFooter'}; +{capture name="footer_main_top"}{hook h='displayFooter'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayFooterAfter.md b/modules/concepts/hooks/list-of-hooks/displayFooterAfter.md index 2596aa9a74..c45daa47eb 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFooterAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayFooterAfter.md @@ -1,17 +1,16 @@ --- Title: displayFooterAfter hidden: true -hookTitle: '' +hookTitle: displayFooterAfter files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/footer.tpl - file: themes/classic/templates/_partials/footer.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/footer.tpl file: themes/hummingbird/templates/_partials/footer.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/footer.tpl + file: themes/classic/templates/_partials/footer.tpl locations: - front office type: display @@ -29,5 +28,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayFooterAfter'}; +{capture name="footer_main_bottom"}{hook h='displayFooterAfter'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayFooterBefore.md b/modules/concepts/hooks/list-of-hooks/displayFooterBefore.md index e5a63b959f..f9be4c2767 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFooterBefore.md +++ b/modules/concepts/hooks/list-of-hooks/displayFooterBefore.md @@ -1,17 +1,16 @@ --- Title: displayFooterBefore hidden: true -hookTitle: '' +hookTitle: displayFooterBefore files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/footer.tpl - file: themes/classic/templates/_partials/footer.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/footer.tpl file: themes/hummingbird/templates/_partials/footer.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/footer.tpl + file: themes/classic/templates/_partials/footer.tpl locations: - front office type: display @@ -29,7 +28,7 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayFooterBefore'}; +{capture name="footer_before"}{hook h='displayFooterBefore'}{/capture} ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/displayFooterCategory.md b/modules/concepts/hooks/list-of-hooks/displayFooterCategory.md index 6c5cbdc2fa..b702e43ff1 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFooterCategory.md +++ b/modules/concepts/hooks/list-of-hooks/displayFooterCategory.md @@ -4,9 +4,13 @@ hidden: true hookTitle: 'This hook adds new blocks under the products listing in a category/search' files: - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/2.0.x/templates/catalog/listing/product-list.tpl' - file: 'Classic Theme: templates/catalog/listing/product-list.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/listing/product-list.tpl + file: themes/hummingbird/templates/catalog/listing/product-list.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/catalog/listing/product-list.tpl + file: themes/classic/templates/catalog/listing/product-list.tpl locations: - 'front office' type: display @@ -23,5 +27,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 23097f2c42..3a889d25f3 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFooterProduct.md +++ b/modules/concepts/hooks/list-of-hooks/displayFooterProduct.md @@ -3,15 +3,14 @@ Title: displayFooterProduct hidden: true hookTitle: 'Product footer' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/catalog/product.tpl - file: themes/classic/templates/catalog/product.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/product.tpl file: themes/hummingbird/templates/catalog/product.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/catalog/product.tpl + file: themes/classic/templates/catalog/product.tpl locations: - front office type: display @@ -30,5 +29,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 d5009b7c44..eae833d34b 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 a271a1a7e3..3bc9e88bb1 100644 --- a/modules/concepts/hooks/list-of-hooks/displayHeader.md +++ b/modules/concepts/hooks/list-of-hooks/displayHeader.md @@ -3,13 +3,17 @@ Title: displayHeader hidden: true hookTitle: 'Pages html head section' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' + file: classes/Hook.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: displayHeader +type: display +hookAliases: + - Header array_return: false check_exceptions: false chain: false @@ -23,5 +27,10 @@ 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'); +return 'displayHeader'; + } + + $hookNamesByAlias = Hook::getCanonicalHookNames(); + + return $hookNamesByAlias[$loweredName] ?? $hookName; ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayHeaderCategory.md b/modules/concepts/hooks/list-of-hooks/displayHeaderCategory.md index e4366a7482..e7edfd0816 100644 --- a/modules/concepts/hooks/list-of-hooks/displayHeaderCategory.md +++ b/modules/concepts/hooks/list-of-hooks/displayHeaderCategory.md @@ -4,9 +4,13 @@ hidden: true hookTitle: 'Footer above of the product list' files: - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/2.0.x/templates/catalog/listing/product-list.tpl' - file: 'Classic Theme: templates/catalog/listing/product-list.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/listing/product-list.tpl + file: themes/hummingbird/templates/catalog/listing/product-list.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/catalog/listing/product-list.tpl + file: themes/classic/templates/catalog/listing/product-list.tpl locations: - 'front office' type: display @@ -23,5 +27,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 a419fb455b..35f77e982e 100644 --- a/modules/concepts/hooks/list-of-hooks/displayHome.md +++ b/modules/concepts/hooks/list-of-hooks/displayHome.md @@ -8,8 +8,9 @@ files: file: controllers/front/IndexController.php locations: - 'front office' -type: action -hookAliases: displayHome +type: display +hookAliases: + - home array_return: false check_exceptions: false chain: false @@ -23,5 +24,5 @@ description: 'This hook displays new elements on the homepage' ## Call of the Hook in the origin file ```php -Hook::exec('displayHome'); +'HOOK_HOME' => Hook::exec('displayHome'), ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayInvoiceLegalFreeText.md b/modules/concepts/hooks/list-of-hooks/displayInvoiceLegalFreeText.md index ffdc8314ce..a3ba27dfb7 100644 --- a/modules/concepts/hooks/list-of-hooks/displayInvoiceLegalFreeText.md +++ b/modules/concepts/hooks/list-of-hooks/displayInvoiceLegalFreeText.md @@ -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]); +$legal_free_text = 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 4170fe8cb4..4d5bf085f0 100644 --- a/modules/concepts/hooks/list-of-hooks/displayLeftColumn.md +++ b/modules/concepts/hooks/list-of-hooks/displayLeftColumn.md @@ -4,14 +4,22 @@ hidden: true hookTitle: 'New elements on a page (left column)' files: - - theme: Classic - url: 'https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl' - file: 'Classic Theme: templates/layouts/layout-both-columns.tpl' + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/hummingbird/templates/layouts/layout-both-columns.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/classic/templates/layouts/layout-both-columns.tpl + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-left-column.tpl + file: themes/hummingbird/templates/layouts/layout-left-column.tpl locations: - 'front office' type: display hookAliases: - - extraLeft + - leftColumn origin: theme array_return: false check_exceptions: false @@ -25,5 +33,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 ad2d2e5168..7015e36c70 100644 --- a/modules/concepts/hooks/list-of-hooks/displayLeftColumnProduct.md +++ b/modules/concepts/hooks/list-of-hooks/displayLeftColumnProduct.md @@ -3,19 +3,18 @@ Title: displayLeftColumnProduct hidden: true hookTitle: 'New elements on the product page (left column)' files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl - file: themes/classic/templates/layouts/layout-both-columns.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-both-columns.tpl file: themes/hummingbird/templates/layouts/layout-both-columns.tpl + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/classic/templates/layouts/layout-both-columns.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-left-column.tpl file: themes/hummingbird/templates/layouts/layout-left-column.tpl - locations: - front office type: display @@ -34,5 +33,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'}; +{hook h='displayLeftColumnProduct'} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayMaintenance.md b/modules/concepts/hooks/list-of-hooks/displayMaintenance.md index df17ed0aee..53d9f4fcc9 100644 --- a/modules/concepts/hooks/list-of-hooks/displayMaintenance.md +++ b/modules/concepts/hooks/list-of-hooks/displayMaintenance.md @@ -8,7 +8,7 @@ files: file: classes/controller/FrontController.php locations: - 'front office' -type: action +type: display 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_MAINTENANCE' => Hook::exec('displayMaintenance'), 'maintenance_text' => Configuration::get('PS_MAINTENANCE_TEXT', (int) $this->context->language->id), 'stylesheets' => $this->getStylesheets(), ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayModuleConfigureExtraButtons.md b/modules/concepts/hooks/list-of-hooks/displayModuleConfigureExtraButtons.md index ce507c6f94..731d37792b 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.2.x/admin-dev/themes/default/template/controllers/modules/configure.tpl' + url: 'https://github.com/PrestaShop/Prestashop/blob/8.0.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 e5e3b6253d..ab8eb67462 100644 --- a/modules/concepts/hooks/list-of-hooks/displayMyAccountBlock.md +++ b/modules/concepts/hooks/list-of-hooks/displayMyAccountBlock.md @@ -2,7 +2,10 @@ Title: displayMyAccountBlock hidden: true hookTitle: 'My account block' -files: { } +files: + - + url: '' + file: '' locations: - 'front office' type: display @@ -21,5 +24,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 e94bdc950a..c0c39834d8 100644 --- a/modules/concepts/hooks/list-of-hooks/displayNav1.md +++ b/modules/concepts/hooks/list-of-hooks/displayNav1.md @@ -3,6 +3,10 @@ Title: displayNav1 hidden: true hookTitle: displayNav1 files: + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/header.tpl + file: themes/hummingbird/templates/_partials/header.tpl - theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/header.tpl @@ -11,11 +15,6 @@ files: theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/header.tpl file: themes/classic/templates/checkout/_partials/header.tpl - - - theme: hummingbird - url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/header.tpl - file: themes/hummingbird/templates/_partials/header.tpl - locations: - front office type: display @@ -33,5 +32,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayNav1'}; +{capture name="header_nav_1"}{hook h='displayNav1'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayNav2.md b/modules/concepts/hooks/list-of-hooks/displayNav2.md index 28d61cff37..fffd834e6f 100644 --- a/modules/concepts/hooks/list-of-hooks/displayNav2.md +++ b/modules/concepts/hooks/list-of-hooks/displayNav2.md @@ -3,6 +3,10 @@ Title: displayNav2 hidden: true hookTitle: displayNav2 files: + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/header.tpl + file: themes/hummingbird/templates/_partials/header.tpl - theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/header.tpl @@ -11,11 +15,6 @@ files: theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/header.tpl file: themes/classic/templates/checkout/_partials/header.tpl - - - theme: hummingbird - url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/header.tpl - file: themes/hummingbird/templates/_partials/header.tpl - locations: - front office type: display @@ -33,5 +32,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayNav2'}; +{capture name="header_nav_2"}{hook h='displayNav2'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayNavFullWidth.md b/modules/concepts/hooks/list-of-hooks/displayNavFullWidth.md index 0ca1f2bec8..1d7f9fbdff 100644 --- a/modules/concepts/hooks/list-of-hooks/displayNavFullWidth.md +++ b/modules/concepts/hooks/list-of-hooks/displayNavFullWidth.md @@ -3,6 +3,10 @@ Title: displayNavFullWidth hidden: true hookTitle: 'Navigation' files: + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/header.tpl + file: themes/hummingbird/templates/_partials/header.tpl - theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/_partials/header.tpl @@ -11,11 +15,6 @@ files: theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/_partials/header.tpl file: themes/classic/templates/checkout/_partials/header.tpl - - - theme: hummingbird - url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/_partials/header.tpl - file: themes/hummingbird/templates/_partials/header.tpl - locations: - front office type: display @@ -33,5 +32,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'}; +{capture name="nav_full_width"}{hook h='displayNavFullWidth'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayNewsletterRegistration.md b/modules/concepts/hooks/list-of-hooks/displayNewsletterRegistration.md index 42cc0e97fa..6940d8a618 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 e42574dd54..c9368c5788 100644 --- a/modules/concepts/hooks/list-of-hooks/displayNotFound.md +++ b/modules/concepts/hooks/list-of-hooks/displayNotFound.md @@ -3,15 +3,14 @@ Title: displayNotFound hidden: true hookTitle: displayNotFound files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/errors/not-found.tpl - file: themes/classic/templates/errors/not-found.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/errors/not-found.tpl file: themes/hummingbird/templates/errors/not-found.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/errors/not-found.tpl + file: themes/classic/templates/errors/not-found.tpl locations: - front office type: display @@ -29,5 +28,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 c51e2d7bb6..902a280df1 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation.md @@ -8,8 +8,9 @@ files: file: controllers/front/OrderConfirmationController.php locations: - 'front office' -type: action -hookAliases: displayOrderConfirmation +type: display +hookAliases: + - orderConfirmation array_return: false check_exceptions: false chain: false @@ -32,5 +33,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]); +return 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 32cb902e08..0eb8ad4743 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation1.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation1.md @@ -3,15 +3,14 @@ Title: displayOrderConfirmation1 hidden: true hookTitle: displayOrderConfirmation1 files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/order-confirmation.tpl - file: themes/classic/templates/checkout/order-confirmation.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/order-confirmation.tpl file: themes/hummingbird/templates/checkout/order-confirmation.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/order-confirmation.tpl + file: themes/classic/templates/checkout/order-confirmation.tpl locations: - front office type: display @@ -29,5 +28,5 @@ description: ## Call of the Hook in the origin file ```php -{hook h='displayOrderConfirmation1'}; +{capture name='hook_order_confirmation_1'}{hook h='displayOrderConfirmation1'}{/capture} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation2.md b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation2.md index b12bf651c3..611f9cb15a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation2.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderConfirmation2.md @@ -3,15 +3,14 @@ Title: displayOrderConfirmation2 hidden: true hookTitle: displayOrderConfirmation2 files: - - - theme: classic - url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/order-confirmation.tpl - file: themes/classic/templates/checkout/order-confirmation.tpl - theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/order-confirmation.tpl file: themes/hummingbird/templates/checkout/order-confirmation.tpl - + - + theme: classic + url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/checkout/order-confirmation.tpl + file: themes/classic/templates/checkout/order-confirmation.tpl locations: - front office type: display @@ -29,5 +28,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 8eeba6fd3e..8b84464aa6 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderDetail.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderDetail.md @@ -3,9 +3,16 @@ Title: displayOrderDetail hidden: true hookTitle: 'Order detail' files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/GuestTrackingController.php' + file: controllers/front/GuestTrackingController.php - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/OrderDetailController.php' file: controllers/front/OrderDetailController.php + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/customer/order-detail.tpl + file: themes/hummingbird/templates/customer/order-detail.tpl locations: - 'front office' type: display @@ -33,5 +40,5 @@ description: "This hook is displayed within the order's details in Front Office" ## Call of the Hook in the origin file ```php -Hook::exec('displayOrderDetail', ['order' => $order]) +'HOOK_DISPLAYORDERDETAIL' => Hook::exec('displayOrderDetail', ['order' => $this->order]), ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md b/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md index b561d79f85..d82acb7025 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md @@ -1,7 +1,7 @@ --- Title: displayOrderPreview hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/preview.html.twig' @@ -32,5 +32,6 @@ description: '' ## Call of the Hook in the origin file ```php -{{ renderhook('displayOrderPreview', {order_id: orderId}) }}; +{{ renderhook('displayOrderPreview', {order_id: orderId}) }} +{% endblock %} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayOverrideTemplate.md b/modules/concepts/hooks/list-of-hooks/displayOverrideTemplate.md index ee2df71c73..eab1a57a3e 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOverrideTemplate.md +++ b/modules/concepts/hooks/list-of-hooks/displayOverrideTemplate.md @@ -8,7 +8,7 @@ files: file: classes/controller/FrontController.php locations: - 'front office' -type: action +type: display hookAliases: array_return: false check_exceptions: false diff --git a/modules/concepts/hooks/list-of-hooks/displayPaymentByBinaries.md b/modules/concepts/hooks/list-of-hooks/displayPaymentByBinaries.md index afb1675e7a..1f0946760c 100644 --- a/modules/concepts/hooks/list-of-hooks/displayPaymentByBinaries.md +++ b/modules/concepts/hooks/list-of-hooks/displayPaymentByBinaries.md @@ -11,7 +11,6 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/steps/payment.tpl file: themes/hummingbird/templates/checkout/_partials/steps/payment.tpl - locations: - front office type: display @@ -29,5 +28,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 596e28cfac..d0dc7a8fde 100644 --- a/modules/concepts/hooks/list-of-hooks/displayPaymentReturn.md +++ b/modules/concepts/hooks/list-of-hooks/displayPaymentReturn.md @@ -8,8 +8,9 @@ files: file: controllers/front/OrderConfirmationController.php locations: - 'front office' -type: action -hookAliases: displayPaymentReturn +type: display +hookAliases: + - paymentReturn array_return: false check_exceptions: false chain: false @@ -23,5 +24,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('displayPaymentReturn', ['order' => $order], $this->id_module); +return 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 e40ceab7e3..0932899871 100644 --- a/modules/concepts/hooks/list-of-hooks/displayPaymentTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayPaymentTop.md @@ -11,7 +11,6 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/steps/payment.tpl file: themes/hummingbird/templates/checkout/_partials/steps/payment.tpl - locations: - front office type: display @@ -30,5 +29,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 3b136d7779..6e7295bb4d 100644 --- a/modules/concepts/hooks/list-of-hooks/displayPersonalInformationTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayPersonalInformationTop.md @@ -11,7 +11,6 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/steps/personal-information.tpl file: themes/hummingbird/templates/checkout/_partials/steps/personal-information.tpl - locations: - front office type: display @@ -29,5 +28,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 6eee84504d..8cf0f159f5 100644 --- a/modules/concepts/hooks/list-of-hooks/displayProductActions.md +++ b/modules/concepts/hooks/list-of-hooks/displayProductActions.md @@ -11,10 +11,9 @@ files: theme: hummingbird url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/_partials/product-add-to-cart.tpl file: themes/hummingbird/templates/catalog/_partials/product-add-to-cart.tpl - locations: - front office -type: action +type: display hookAliases: origin: theme array_return: false @@ -29,5 +28,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 e0284c4f7e..d2809faeb6 100644 --- a/modules/concepts/hooks/list-of-hooks/displayProductAdditionalInfo.md +++ b/modules/concepts/hooks/list-of-hooks/displayProductAdditionalInfo.md @@ -3,6 +3,10 @@ Title: displayProductAdditionalInfo hidden: true hookTitle: 'Product page additional info' files: + - + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/_partials/product-additional-info.tpl + file: themes/hummingbird/templates/catalog/_partials/product-additional-info.tpl - theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/catalog/_partials/product-additional-info.tpl @@ -11,15 +15,6 @@ files: theme: classic url: https://github.com/PrestaShop/classic-theme/blob/develop/templates/catalog/_partials/quickview.tpl file: themes/classic/templates/catalog/_partials/quickview.tpl - - - theme: hummingbird - url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/_partials/product-additional-info.tpl - file: themes/hummingbird/templates/catalog/_partials/product-additional-info.tpl - - - theme: hummingbird - url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/catalog/_partials/quickview.tpl - file: themes/hummingbird/templates/catalog/_partials/quickview.tpl - locations: - front office type: display @@ -39,5 +34,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 ac478ba722..3afcb9bd69 100644 --- a/modules/concepts/hooks/list-of-hooks/displayProductExtraContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayProductExtraContent.md @@ -3,20 +3,16 @@ Title: displayProductExtraContent hidden: true hookTitle: 'Add content to the product page' files: - - - theme: classic - 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/9.1.x/src/Core/Product/ProductExtraContent.php' - file: 'src/Core/Product/ProductExtraContent.php' + file: src/Core/Product/ProductExtraContent.php - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Core/Product/ProductExtraContentFinder.php' - file: 'src/Core/Product/ProductExtraContentFinder.php' + file: src/Core/Product/ProductExtraContentFinder.php locations: - 'front office' type: display -hookAliases: +hookAliases: origin: core array_return: false check_exceptions: false @@ -30,8 +26,11 @@ has_example: true ## Call of the Hook in the origin file ```php -protected $hookName = 'displayProductExtraContent'; -protected $expectedInstanceClasses = ['PrestaShop\PrestaShop\Core\Product\ProductExtraContent']; + $categoryVar], $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/filterCmsCategoryContent.md b/modules/concepts/hooks/list-of-hooks/filterCmsCategoryContent.md index 483225fd41..933e1bae1f 100644 --- a/modules/concepts/hooks/list-of-hooks/filterCmsCategoryContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterCmsCategoryContent.md @@ -23,14 +23,10 @@ description: 'This hook is called just before fetching content page category' ## Call of the Hook in the origin file ```php -Hook::exec( - 'filterCmsCategoryContent', +'filterCmsCategoryContent', ['object' => $cmsCategoryVar], 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 d068204671..db8265470a 100644 --- a/modules/concepts/hooks/list-of-hooks/filterCmsContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterCmsContent.md @@ -23,14 +23,10 @@ description: 'This hook is called just before fetching content page' ## Call of the Hook in the origin file ```php -Hook::exec( - 'filterCmsContent', +'filterCmsContent', ['object' => $cmsVar], 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 be57fdc4ff..0e99e76b28 100644 --- a/modules/concepts/hooks/list-of-hooks/filterHtmlContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterHtmlContent.md @@ -23,18 +23,10 @@ description: 'This hook is called just before fetching a page on HTML field' ## Call of the Hook in the origin file ```php -Hook::exec( - 'filterHtmlContent', +'filterHtmlContent', [ 'type' => $type, 'htmlFields' => $htmlFields, 'object' => $presentedObject, ], - null, - false, - true, - false, - null, - true - ); ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterManufacturerContent.md b/modules/concepts/hooks/list-of-hooks/filterManufacturerContent.md index 2463989eb1..c7295dec22 100644 --- a/modules/concepts/hooks/list-of-hooks/filterManufacturerContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterManufacturerContent.md @@ -23,14 +23,10 @@ description: 'This hook is called just before fetching content page manufacturer ## Call of the Hook in the origin file ```php -Hook::exec( - 'filterManufacturerContent', - ['object' => $manufacturer], - $id_module = null, - $array_return = false, - $check_exceptions = true, - $use_push = false, - $id_shop = null, - $chain = true - ); +'filterManufacturerContent', + ['object' => $manufacturerVar], + $id_module = null, + $array_return = false, + $check_exceptions = true, + $use_push = false, ``` diff --git a/modules/concepts/hooks/list-of-hooks/filterProductContent.md b/modules/concepts/hooks/list-of-hooks/filterProductContent.md index 9135836ff7..d0e7b96f51 100644 --- a/modules/concepts/hooks/list-of-hooks/filterProductContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterProductContent.md @@ -23,14 +23,10 @@ description: 'This hook is called just before fetching content page product' ## Call of the Hook in the origin file ```php -Hook::exec( - 'filterProductContent', +'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 2f31f33d0f..feaa920931 100644 --- a/modules/concepts/hooks/list-of-hooks/filterProductSearch.md +++ b/modules/concepts/hooks/list-of-hooks/filterProductSearch.md @@ -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 710e33b452..5a0adb6356 100644 --- a/modules/concepts/hooks/list-of-hooks/filterSupplierContent.md +++ b/modules/concepts/hooks/list-of-hooks/filterSupplierContent.md @@ -23,14 +23,10 @@ description: 'This hook is called just before fetching content page supplier' ## Call of the Hook in the origin file ```php -Hook::exec( - 'filterSupplierContent', - ['object' => $supplier], - null, - false, - true, - false, - null, - true - ); +'filterSupplierContent', + ['object' => $supplierVar], + null, + false, + true, + false, ``` diff --git a/modules/concepts/hooks/list-of-hooks/gSitemapAppendUrls.md b/modules/concepts/hooks/list-of-hooks/gSitemapAppendUrls.md index 1fbf70db35..57b909be2a 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/gsitemap/blob/master/gsitemap.php' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/modules/gsitemap/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 6b26f7c6db..16041399ce 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.2.x/src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/catalog.html.twig' + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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 f1b6bccc99..409893fe98 100644 --- a/modules/concepts/hooks/list-of-hooks/moduleRoutes.md +++ b/modules/concepts/hooks/list-of-hooks/moduleRoutes.md @@ -1,7 +1,7 @@ --- Title: moduleRoutes hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Dispatcher.php' @@ -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); +$modules_routes = Hook::exec('moduleRoutes', ['id_shop' => $id_shop], null, true, false) ``` ## Example implementation diff --git a/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md b/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md index eb297532d8..3cb85fc278 100644 --- a/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md +++ b/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md @@ -1,7 +1,7 @@ --- Title: overrideLayoutTemplate hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' @@ -23,14 +23,10 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'overrideLayoutTemplate', +'overrideLayoutTemplate', [ 'default_layout' => $layout, 'entity' => $entity, 'locale' => $this->context->language->locale, '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 7fddd80d96..80a84b7e86 100644 --- a/modules/concepts/hooks/list-of-hooks/overrideMinimalPurchasePrice.md +++ b/modules/concepts/hooks/list-of-hooks/overrideMinimalPurchasePrice.md @@ -1,8 +1,11 @@ --- Title: overrideMinimalPurchasePrice hidden: true -hookTitle: '' +hookTitle: files: files: + - + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/ModuleFrontController.php' + file: classes/controller/ModuleFrontController.php - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Cart/CartLazyArray.php' file: src/Adapter/Presenter/Cart/CartLazyArray.php @@ -23,7 +26,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('overrideMinimalPurchasePrice', [ - 'minimalPurchase' => &$minimalPurchase, - ]); +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 d8b293c966..0169c102a1 100644 --- a/modules/concepts/hooks/list-of-hooks/productSearchProvider.md +++ b/modules/concepts/hooks/list-of-hooks/productSearchProvider.md @@ -1,7 +1,7 @@ --- Title: productSearchProvider hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/ProductListingFrontController.php' @@ -23,8 +23,7 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec( - 'productSearchProvider', +'productSearchProvider', ['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 e647187d28..de1824e810 100644 --- a/modules/concepts/hooks/list-of-hooks/sendMailAlterTemplateVars.md +++ b/modules/concepts/hooks/list-of-hooks/sendMailAlterTemplateVars.md @@ -23,8 +23,7 @@ description: 'This hook is called when Mail::send() is called' ## Call of the Hook in the origin file ```php -Hook::exec( - 'sendMailAlterTemplateVars', +'sendMailAlterTemplateVars', [ '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 980e0edcbe..7ba144e156 100644 --- a/modules/concepts/hooks/list-of-hooks/termsAndConditions.md +++ b/modules/concepts/hooks/list-of-hooks/termsAndConditions.md @@ -1,7 +1,7 @@ --- Title: termsAndConditions hidden: true -hookTitle: '' +hookTitle: files: files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/ConditionsToApproveFinder.php' @@ -23,5 +23,5 @@ description: '' ## Call of the Hook in the origin file ```php -Hook::exec('termsAndConditions', [], null, true); +$hookedConditions = 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 4325280087..55d73b51f3 100644 --- a/modules/concepts/hooks/list-of-hooks/validateCustomerFormFields.md +++ b/modules/concepts/hooks/list-of-hooks/validateCustomerFormFields.md @@ -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); +$validatedCustomerFormFields = Hook::exec('validateCustomerFormFields', ['fields' => $formFields], $moduleId, true) ``` From 3d2e2c6185505514fb445f4a2d9ab3a92ebb1e59 Mon Sep 17 00:00:00 2001 From: MadMax Date: Fri, 22 May 2026 21:23:32 +0300 Subject: [PATCH 3/4] Fix malformed hook front matter in metadata sync pages. Repair invalid YAML introduced as `hookTitle: files:` by restoring an empty `hookTitle` field and keeping `files` as a separate key across affected hook pages so Hugo parsing succeeds. Co-authored-by: Cursor --- .../hooks/list-of-hooks/actionAdminControllerSetMedia.md | 2 +- .../concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md | 2 +- .../concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md | 2 +- .../hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md | 2 +- .../hooks/list-of-hooks/actionAdminMetaBeforeWriteRobotsFile.md | 2 +- .../hooks/list-of-hooks/actionAttributeCombinationDelete.md | 2 +- .../hooks/list-of-hooks/actionAttributeCombinationSave.md | 2 +- modules/concepts/hooks/list-of-hooks/actionCartSummary.md | 2 +- modules/concepts/hooks/list-of-hooks/actionCustomerAddGroups.md | 2 +- .../hooks/list-of-hooks/actionCustomerBeforeUpdateGroup.md | 2 +- .../concepts/hooks/list-of-hooks/actionDeleteGDPRCustomer.md | 2 +- .../concepts/hooks/list-of-hooks/actionDeliveryPriceByPrice.md | 2 +- .../concepts/hooks/list-of-hooks/actionDeliveryPriceByWeight.md | 2 +- modules/concepts/hooks/list-of-hooks/actionDispatcher.md | 2 +- .../concepts/hooks/list-of-hooks/actionDownloadAttachment.md | 2 +- modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md | 2 +- .../hooks/list-of-hooks/actionFrontControllerSetMedia.md | 2 +- .../hooks/list-of-hooks/actionGetExtraMailTemplateVars.md | 2 +- .../concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md | 2 +- .../hooks/list-of-hooks/actionGetProductPropertiesAfter.md | 2 +- .../hooks/list-of-hooks/actionGetProductPropertiesBefore.md | 2 +- .../hooks/list-of-hooks/actionInvoiceNumberFormatted.md | 2 +- .../hooks/list-of-hooks/actionModuleMailAlertSendCustomer.md | 2 +- .../hooks/list-of-hooks/actionModuleRegisterHookAfter.md | 2 +- .../hooks/list-of-hooks/actionModuleRegisterHookBefore.md | 2 +- .../hooks/list-of-hooks/actionModuleUnRegisterHookAfter.md | 2 +- .../hooks/list-of-hooks/actionModuleUnRegisterHookBefore.md | 2 +- .../hooks/list-of-hooks/actionNewsletterRegistrationAfter.md | 2 +- .../hooks/list-of-hooks/actionNewsletterRegistrationBefore.md | 2 +- modules/concepts/hooks/list-of-hooks/actionObjectAddAfter.md | 2 +- modules/concepts/hooks/list-of-hooks/actionObjectAddBefore.md | 2 +- modules/concepts/hooks/list-of-hooks/actionObjectDeleteAfter.md | 2 +- .../concepts/hooks/list-of-hooks/actionObjectDeleteBefore.md | 2 +- .../list-of-hooks/actionObjectProductCommentValidateAfter.md | 2 +- modules/concepts/hooks/list-of-hooks/actionObjectUpdateAfter.md | 2 +- .../concepts/hooks/list-of-hooks/actionObjectUpdateBefore.md | 2 +- modules/concepts/hooks/list-of-hooks/actionOnImageCutAfter.md | 2 +- .../concepts/hooks/list-of-hooks/actionOnImageResizeAfter.md | 2 +- .../concepts/hooks/list-of-hooks/actionOrderHistoryAddAfter.md | 2 +- modules/concepts/hooks/list-of-hooks/actionPasswordRenew.md | 2 +- modules/concepts/hooks/list-of-hooks/actionPresentModule.md | 2 +- modules/concepts/hooks/list-of-hooks/actionProductCoverage.md | 2 +- modules/concepts/hooks/list-of-hooks/actionSearch.md | 2 +- modules/concepts/hooks/list-of-hooks/actionSetInvoice.md | 2 +- .../concepts/hooks/list-of-hooks/actionShopDataDuplication.md | 2 +- .../hooks/list-of-hooks/actionSubmitCustomerAddressForm.md | 2 +- .../concepts/hooks/list-of-hooks/actionValidateStepComplete.md | 2 +- .../concepts/hooks/list-of-hooks/actionWishlistAddProduct.md | 2 +- modules/concepts/hooks/list-of-hooks/dashboardData.md | 2 +- modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md | 2 +- modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md | 2 +- modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md | 2 +- modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md | 2 +- modules/concepts/hooks/list-of-hooks/displayAdminForm.md | 2 +- modules/concepts/hooks/list-of-hooks/displayAdminListAfter.md | 2 +- modules/concepts/hooks/list-of-hooks/displayAdminListBefore.md | 2 +- .../concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md | 2 +- modules/concepts/hooks/list-of-hooks/displayAdminOptions.md | 2 +- .../concepts/hooks/list-of-hooks/displayAdminOrderSideBottom.md | 2 +- modules/concepts/hooks/list-of-hooks/displayAdminView.md | 2 +- modules/concepts/hooks/list-of-hooks/displayCustomization.md | 2 +- modules/concepts/hooks/list-of-hooks/displayOrderPreview.md | 2 +- modules/concepts/hooks/list-of-hooks/moduleRoutes.md | 2 +- modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md | 2 +- .../hooks/list-of-hooks/overrideMinimalPurchasePrice.md | 2 +- modules/concepts/hooks/list-of-hooks/productSearchProvider.md | 2 +- modules/concepts/hooks/list-of-hooks/termsAndConditions.md | 2 +- 67 files changed, 67 insertions(+), 67 deletions(-) diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md b/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md index 8f9be28df9..26016b1eac 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminControllerSetMedia.md @@ -1,7 +1,7 @@ --- Title: actionAdminControllerSetMedia hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md index 3375bcf0fb..cfcc522105 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateAfter.md @@ -1,7 +1,7 @@ --- Title: actionAdminDuplicateAfter hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Update/ProductDuplicator.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md index 80c3a36cdf..2840e6d693 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminDuplicateBefore.md @@ -1,7 +1,7 @@ --- Title: actionAdminDuplicateBefore hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Product/Update/ProductDuplicator.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md b/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md index 9264412414..58bd761d56 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMetaAfterWriteRobotsFile.md @@ -1,7 +1,7 @@ --- Title: actionAdminMetaAfterWriteRobotsFile hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionAdminMetaBeforeWriteRobotsFile.md b/modules/concepts/hooks/list-of-hooks/actionAdminMetaBeforeWriteRobotsFile.md index 0125ef68ec..79eb1d88af 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAdminMetaBeforeWriteRobotsFile.md +++ b/modules/concepts/hooks/list-of-hooks/actionAdminMetaBeforeWriteRobotsFile.md @@ -1,7 +1,7 @@ --- Title: actionAdminMetaBeforeWriteRobotsFile hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Tools.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md b/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md index 6600fd3401..b3db1caee2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationDelete.md @@ -1,7 +1,7 @@ --- Title: actionAttributeCombinationDelete hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Combination.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationSave.md b/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationSave.md index 799807ab48..723853dca4 100644 --- a/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationSave.md +++ b/modules/concepts/hooks/list-of-hooks/actionAttributeCombinationSave.md @@ -1,7 +1,7 @@ --- Title: actionAttributeCombinationSave hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Combination.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionCartSummary.md b/modules/concepts/hooks/list-of-hooks/actionCartSummary.md index 97e5abef0d..1c2bda04f6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCartSummary.md +++ b/modules/concepts/hooks/list-of-hooks/actionCartSummary.md @@ -1,7 +1,7 @@ --- Title: actionCartSummary hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Cart.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionCustomerAddGroups.md b/modules/concepts/hooks/list-of-hooks/actionCustomerAddGroups.md index 86e28a03b2..3bc0e99b10 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerAddGroups.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerAddGroups.md @@ -1,7 +1,7 @@ --- Title: actionCustomerAddGroups hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Customer.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionCustomerBeforeUpdateGroup.md b/modules/concepts/hooks/list-of-hooks/actionCustomerBeforeUpdateGroup.md index 8dec70196a..a0385a38ef 100644 --- a/modules/concepts/hooks/list-of-hooks/actionCustomerBeforeUpdateGroup.md +++ b/modules/concepts/hooks/list-of-hooks/actionCustomerBeforeUpdateGroup.md @@ -1,7 +1,7 @@ --- Title: actionCustomerBeforeUpdateGroup hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Customer.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionDeleteGDPRCustomer.md b/modules/concepts/hooks/list-of-hooks/actionDeleteGDPRCustomer.md index 721b0ccc35..1e90995787 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: files: +hookTitle: '' files: - module: psgdpr diff --git a/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByPrice.md b/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByPrice.md index 9122834e91..de19c386a5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByPrice.md +++ b/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByPrice.md @@ -1,7 +1,7 @@ --- Title: actionDeliveryPriceByPrice hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Carrier.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByWeight.md b/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByWeight.md index ea7490d6a8..3018807187 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByWeight.md +++ b/modules/concepts/hooks/list-of-hooks/actionDeliveryPriceByWeight.md @@ -1,7 +1,7 @@ --- Title: actionDeliveryPriceByWeight hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Carrier.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionDispatcher.md b/modules/concepts/hooks/list-of-hooks/actionDispatcher.md index 5b20e23988..9c9f72cabc 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDispatcher.md +++ b/modules/concepts/hooks/list-of-hooks/actionDispatcher.md @@ -1,7 +1,7 @@ --- Title: actionDispatcher hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Dispatcher.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md b/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md index 08dd98ccd5..46805d9b35 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md +++ b/modules/concepts/hooks/list-of-hooks/actionDownloadAttachment.md @@ -1,7 +1,7 @@ --- Title: actionDownloadAttachment hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/AttachmentController.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md b/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md index 2d0f8e0ac6..fc47716fcf 100644 --- a/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md +++ b/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md @@ -1,7 +1,7 @@ --- Title: actionExportGDPRData hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/modules/psgdpr/psgdpr.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md index 86a901929f..35160d37e2 100644 --- a/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md +++ b/modules/concepts/hooks/list-of-hooks/actionFrontControllerSetMedia.md @@ -1,7 +1,7 @@ --- Title: actionFrontControllerSetMedia hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md b/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md index 527db2eda7..116d21e146 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetExtraMailTemplateVars.md @@ -1,7 +1,7 @@ --- Title: actionGetExtraMailTemplateVars hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Mail.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md b/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md index 88956777d8..fe0b03d6ee 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetIDZoneByAddressID.md @@ -1,7 +1,7 @@ --- Title: actionGetIDZoneByAddressID hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Address.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfter.md b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfter.md index e97e1c426c..5387182719 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesAfter.md @@ -1,7 +1,7 @@ --- Title: actionGetProductPropertiesAfter hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesBefore.md b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesBefore.md index 9ef4759ed7..1d95d05640 100644 --- a/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionGetProductPropertiesBefore.md @@ -1,7 +1,7 @@ --- Title: actionGetProductPropertiesBefore hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md b/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md index cfc4fbc6e3..3f6301450e 100644 --- a/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md +++ b/modules/concepts/hooks/list-of-hooks/actionInvoiceNumberFormatted.md @@ -1,7 +1,7 @@ --- Title: actionInvoiceNumberFormatted hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderInvoice.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleMailAlertSendCustomer.md b/modules/concepts/hooks/list-of-hooks/actionModuleMailAlertSendCustomer.md index adafa505a3..929a72c760 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: files: +hookTitle: '' files: - module: ps_emailalerts diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookAfter.md b/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookAfter.md index b21b3ac8ef..c36cb212c6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookAfter.md @@ -1,7 +1,7 @@ --- Title: actionModuleRegisterHookAfter hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookBefore.md b/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookBefore.md index cf932089ea..b8f6e05cda 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleRegisterHookBefore.md @@ -1,7 +1,7 @@ --- Title: actionModuleRegisterHookBefore hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookAfter.md b/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookAfter.md index 1b10d38741..84881ef1b6 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookAfter.md @@ -1,7 +1,7 @@ --- Title: actionModuleUnRegisterHookAfter hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookBefore.md b/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookBefore.md index 87a3467793..c41da87e91 100644 --- a/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionModuleUnRegisterHookBefore.md @@ -1,7 +1,7 @@ --- Title: actionModuleUnRegisterHookBefore hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Hook.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationAfter.md b/modules/concepts/hooks/list-of-hooks/actionNewsletterRegistrationAfter.md index e2ceb5e817..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: files: +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 7ed7b76fcf..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: files: +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 f2d2156698..4f05b72063 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectAddAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectAddAfter.md @@ -1,7 +1,7 @@ --- Title: actionObjectAddAfter hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectAddBefore.md b/modules/concepts/hooks/list-of-hooks/actionObjectAddBefore.md index be51635052..7dbb2c2534 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectAddBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectAddBefore.md @@ -1,7 +1,7 @@ --- Title: actionObjectAddBefore hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectDeleteAfter.md b/modules/concepts/hooks/list-of-hooks/actionObjectDeleteAfter.md index 17684e5133..060452ea6b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectDeleteAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectDeleteAfter.md @@ -1,7 +1,7 @@ --- Title: actionObjectDeleteAfter hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectDeleteBefore.md b/modules/concepts/hooks/list-of-hooks/actionObjectDeleteBefore.md index 70685ac2d2..2eea1efdba 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectDeleteBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectDeleteBefore.md @@ -1,7 +1,7 @@ --- Title: actionObjectDeleteBefore hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectProductCommentValidateAfter.md b/modules/concepts/hooks/list-of-hooks/actionObjectProductCommentValidateAfter.md index a17b0d11f6..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: files: +hookTitle: '' files: - module: productcomments diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectUpdateAfter.md b/modules/concepts/hooks/list-of-hooks/actionObjectUpdateAfter.md index fc102daa31..76984b250b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectUpdateAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectUpdateAfter.md @@ -1,7 +1,7 @@ --- Title: actionObjectUpdateAfter hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionObjectUpdateBefore.md b/modules/concepts/hooks/list-of-hooks/actionObjectUpdateBefore.md index a25e64cd75..218c4cdd95 100644 --- a/modules/concepts/hooks/list-of-hooks/actionObjectUpdateBefore.md +++ b/modules/concepts/hooks/list-of-hooks/actionObjectUpdateBefore.md @@ -1,7 +1,7 @@ --- Title: actionObjectUpdateBefore hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionOnImageCutAfter.md b/modules/concepts/hooks/list-of-hooks/actionOnImageCutAfter.md index a381f2175d..b46377b304 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOnImageCutAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionOnImageCutAfter.md @@ -1,7 +1,7 @@ --- Title: actionOnImageCutAfter hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ImageManager.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionOnImageResizeAfter.md b/modules/concepts/hooks/list-of-hooks/actionOnImageResizeAfter.md index d00b6cc97d..b680306623 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOnImageResizeAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionOnImageResizeAfter.md @@ -1,7 +1,7 @@ --- Title: actionOnImageResizeAfter hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ImageManager.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionOrderHistoryAddAfter.md b/modules/concepts/hooks/list-of-hooks/actionOrderHistoryAddAfter.md index 64a8269f52..3de19a59fb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionOrderHistoryAddAfter.md +++ b/modules/concepts/hooks/list-of-hooks/actionOrderHistoryAddAfter.md @@ -1,7 +1,7 @@ --- Title: actionOrderHistoryAddAfter hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/OrderHistory.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionPasswordRenew.md b/modules/concepts/hooks/list-of-hooks/actionPasswordRenew.md index b580c370eb..a8be81fbeb 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPasswordRenew.md +++ b/modules/concepts/hooks/list-of-hooks/actionPasswordRenew.md @@ -1,7 +1,7 @@ --- Title: actionPasswordRenew hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/front/PasswordController.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionPresentModule.md b/modules/concepts/hooks/list-of-hooks/actionPresentModule.md index c2fe0256d9..734d0e039a 100644 --- a/modules/concepts/hooks/list-of-hooks/actionPresentModule.md +++ b/modules/concepts/hooks/list-of-hooks/actionPresentModule.md @@ -1,7 +1,7 @@ --- Title: actionPresentModule hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Presenter/Module/ModulePresenter.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionProductCoverage.md b/modules/concepts/hooks/list-of-hooks/actionProductCoverage.md index 5e3e9a0479..be72082051 100644 --- a/modules/concepts/hooks/list-of-hooks/actionProductCoverage.md +++ b/modules/concepts/hooks/list-of-hooks/actionProductCoverage.md @@ -1,7 +1,7 @@ --- Title: actionProductCoverage hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/stock/StockManager.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionSearch.md b/modules/concepts/hooks/list-of-hooks/actionSearch.md index de3dc89327..d6c0fb16d5 100644 --- a/modules/concepts/hooks/list-of-hooks/actionSearch.md +++ b/modules/concepts/hooks/list-of-hooks/actionSearch.md @@ -1,7 +1,7 @@ --- Title: actionSearch hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Search/SearchProductSearchProvider.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionSetInvoice.md b/modules/concepts/hooks/list-of-hooks/actionSetInvoice.md index 1bd38ecd2e..a546e1516d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionSetInvoice.md +++ b/modules/concepts/hooks/list-of-hooks/actionSetInvoice.md @@ -1,7 +1,7 @@ --- Title: actionSetInvoice hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/order/Order.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionShopDataDuplication.md b/modules/concepts/hooks/list-of-hooks/actionShopDataDuplication.md index 7e706987ec..a1e3157f38 100644 --- a/modules/concepts/hooks/list-of-hooks/actionShopDataDuplication.md +++ b/modules/concepts/hooks/list-of-hooks/actionShopDataDuplication.md @@ -1,7 +1,7 @@ --- Title: actionShopDataDuplication hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/shop/Shop.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md b/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md index 8155118270..3671b2a171 100644 --- a/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md +++ b/modules/concepts/hooks/list-of-hooks/actionSubmitCustomerAddressForm.md @@ -1,7 +1,7 @@ --- Title: actionSubmitCustomerAddressForm hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/form/CustomerAddressForm.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md b/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md index c57d2e006a..563a7d065c 100644 --- a/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md +++ b/modules/concepts/hooks/list-of-hooks/actionValidateStepComplete.md @@ -1,7 +1,7 @@ --- Title: actionValidateStepComplete hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/CheckoutDeliveryStep.php' diff --git a/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md b/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md index 7f5b49d041..8841df078b 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: files: +hookTitle: '' files: - module: blockwishlist diff --git a/modules/concepts/hooks/list-of-hooks/dashboardData.md b/modules/concepts/hooks/list-of-hooks/dashboardData.md index ab1520c30c..5fedac8715 100644 --- a/modules/concepts/hooks/list-of-hooks/dashboardData.md +++ b/modules/concepts/hooks/list-of-hooks/dashboardData.md @@ -1,7 +1,7 @@ --- Title: dashboardData hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' diff --git a/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md b/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md index ca300a6868..f540e35a9a 100644 --- a/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md +++ b/modules/concepts/hooks/list-of-hooks/dashboardZoneOne.md @@ -1,7 +1,7 @@ --- Title: dashboardZoneOne hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' diff --git a/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md b/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md index 472e44fdd4..461b1d5052 100644 --- a/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md +++ b/modules/concepts/hooks/list-of-hooks/dashboardZoneTwo.md @@ -1,7 +1,7 @@ --- Title: dashboardZoneTwo hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminDashboardController.php' diff --git a/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md b/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md index c95da7dd30..827372841d 100644 --- a/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md +++ b/modules/concepts/hooks/list-of-hooks/deleteProductAttribute.md @@ -1,7 +1,7 @@ --- Title: deleteProductAttribute hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md b/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md index 9076c42447..eb1ed03b4a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminAfterHeader.md @@ -1,7 +1,7 @@ --- Title: displayAdminAfterHeader hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/header.tpl' diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminForm.md b/modules/concepts/hooks/list-of-hooks/displayAdminForm.md index 40b623a7a5..4678ae9a05 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminForm.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminForm.md @@ -1,7 +1,7 @@ --- Title: displayAdminForm hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/form/form.tpl' diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminListAfter.md b/modules/concepts/hooks/list-of-hooks/displayAdminListAfter.md index 549dfeee62..33d9667ca0 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminListAfter.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminListAfter.md @@ -1,7 +1,7 @@ --- Title: displayAdminListAfter hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/controllers/countries/helpers/list/list_footer.tpl' diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminListBefore.md b/modules/concepts/hooks/list-of-hooks/displayAdminListBefore.md index dcd2e57f70..92e9c0e089 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminListBefore.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminListBefore.md @@ -1,7 +1,7 @@ --- Title: displayAdminListBefore hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_header.tpl' diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md b/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md index e1a5b00c79..83384897d7 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminNavBarBeforeEnd.md @@ -1,7 +1,7 @@ --- Title: displayAdminNavBarBeforeEnd hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/nav.tpl' diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md b/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md index 8b32dfb4fd..f0a2ebd6ae 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOptions.md @@ -1,7 +1,7 @@ --- Title: displayAdminOptions hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/options/options.tpl' diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminOrderSideBottom.md b/modules/concepts/hooks/list-of-hooks/displayAdminOrderSideBottom.md index d3534d0cda..4e56899b33 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminOrderSideBottom.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminOrderSideBottom.md @@ -1,7 +1,7 @@ --- Title: displayAdminOrderSideBottom hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/view.html.twig' diff --git a/modules/concepts/hooks/list-of-hooks/displayAdminView.md b/modules/concepts/hooks/list-of-hooks/displayAdminView.md index 21dec66ab7..8cf6d937b3 100644 --- a/modules/concepts/hooks/list-of-hooks/displayAdminView.md +++ b/modules/concepts/hooks/list-of-hooks/displayAdminView.md @@ -1,7 +1,7 @@ --- Title: displayAdminView hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/admin-dev/themes/default/template/helpers/view/view.tpl' diff --git a/modules/concepts/hooks/list-of-hooks/displayCustomization.md b/modules/concepts/hooks/list-of-hooks/displayCustomization.md index 80429fb591..e8694a568d 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomization.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomization.md @@ -1,7 +1,7 @@ --- Title: displayCustomization hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Product.php' diff --git a/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md b/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md index d82acb7025..5fdf8a2f1a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md +++ b/modules/concepts/hooks/list-of-hooks/displayOrderPreview.md @@ -1,7 +1,7 @@ --- Title: displayOrderPreview hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/preview.html.twig' diff --git a/modules/concepts/hooks/list-of-hooks/moduleRoutes.md b/modules/concepts/hooks/list-of-hooks/moduleRoutes.md index 409893fe98..57a81e8062 100644 --- a/modules/concepts/hooks/list-of-hooks/moduleRoutes.md +++ b/modules/concepts/hooks/list-of-hooks/moduleRoutes.md @@ -1,7 +1,7 @@ --- Title: moduleRoutes hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Dispatcher.php' diff --git a/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md b/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md index 3cb85fc278..d16bf07b7d 100644 --- a/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md +++ b/modules/concepts/hooks/list-of-hooks/overrideLayoutTemplate.md @@ -1,7 +1,7 @@ --- Title: overrideLayoutTemplate hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/FrontController.php' diff --git a/modules/concepts/hooks/list-of-hooks/overrideMinimalPurchasePrice.md b/modules/concepts/hooks/list-of-hooks/overrideMinimalPurchasePrice.md index 80a84b7e86..eeff9ce5e2 100644 --- a/modules/concepts/hooks/list-of-hooks/overrideMinimalPurchasePrice.md +++ b/modules/concepts/hooks/list-of-hooks/overrideMinimalPurchasePrice.md @@ -1,7 +1,7 @@ --- Title: overrideMinimalPurchasePrice hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/ModuleFrontController.php' diff --git a/modules/concepts/hooks/list-of-hooks/productSearchProvider.md b/modules/concepts/hooks/list-of-hooks/productSearchProvider.md index 0169c102a1..70811f282a 100644 --- a/modules/concepts/hooks/list-of-hooks/productSearchProvider.md +++ b/modules/concepts/hooks/list-of-hooks/productSearchProvider.md @@ -1,7 +1,7 @@ --- Title: productSearchProvider hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/ProductListingFrontController.php' diff --git a/modules/concepts/hooks/list-of-hooks/termsAndConditions.md b/modules/concepts/hooks/list-of-hooks/termsAndConditions.md index 7ba144e156..4d64907bd9 100644 --- a/modules/concepts/hooks/list-of-hooks/termsAndConditions.md +++ b/modules/concepts/hooks/list-of-hooks/termsAndConditions.md @@ -1,7 +1,7 @@ --- Title: termsAndConditions hidden: true -hookTitle: files: +hookTitle: '' files: - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/checkout/ConditionsToApproveFinder.php' From 2989280de375b30477f50455c84c819787bcef81 Mon Sep 17 00:00:00 2001 From: MadMax Date: Fri, 22 May 2026 22:53:15 +0300 Subject: [PATCH 4/4] Finalize hook documentation sync for PrestaShop 9.1.x. Apply systematic fixes across hook pages: restore reviewer-requested origins, remove stale paths, align module/theme links to real repositories, normalize metadata consistency, and keep snippets/examples compatible with the current source layout. Co-authored-by: Cursor --- ...LegacyControllerName>ListingFieldsModifier.md | 16 +++++----------- ...egacyControllerName>ListingResultsModifier.md | 12 ++++++------ .../list-of-hooks/actionDeleteGDPRCustomer.md | 2 +- .../hooks/list-of-hooks/actionExportGDPRData.md | 7 ++++--- .../list-of-hooks/actionMainMenuModifier.md | 7 ++++--- .../list-of-hooks/actionWishlistAddProduct.md | 2 +- .../displayBackOfficeEmployeeMenu.md | 9 ++++++--- .../list-of-hooks/displayCartExtraProductInfo.md | 9 +++++---- .../list-of-hooks/displayCustomerAccountTop.md | 9 +++++---- .../list-of-hooks/displayFeaturePostProcess.md | 5 +---- .../list-of-hooks/displayFeatureValueForm.md | 5 +---- .../displayFeatureValuePostProcess.md | 5 +---- .../hooks/list-of-hooks/displayModalContent.md | 9 +++++---- .../hooks/list-of-hooks/displayMyAccountBlock.md | 5 +---- .../hooks/list-of-hooks/gSitemapAppendUrls.md | 7 ++++--- .../hooks/list-of-hooks/legacyblockkpi.md | 4 ++-- 16 files changed, 52 insertions(+), 61 deletions(-) diff --git a/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md b/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md index 54e4f4ccf1..6a43ac9363 100644 --- a/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionListingFieldsModifier.md @@ -4,10 +4,10 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php' - file: src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' + file: classes/controller/AdminController.php locations: - - 'front office' + - 'back office' type: action hookAliases: array_return: false @@ -23,13 +23,7 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchWithParameters('action' . $helperListConfiguration->legacyControllerName . 'ListingFieldsModifier', [ - 'select' => &$helperListConfiguration->select, - 'join' => &$helperListConfiguration->join, - 'where' => &$helperListConfiguration->where, - 'group_by' => &$helperListConfiguration->group, - 'order_by' => &$helperListConfiguration->orderBy, - 'order_way' => &$helperListConfiguration->orderWay, - 'fields' => &$helperListConfiguration->fieldsList, +Hook::exec('action' . $this->controller_name . 'ListingFieldsModifier', [ + 'fields' => &$this->fields_list, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md b/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md index 90140f5c3d..e43800488b 100644 --- a/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionListingResultsModifier.md @@ -4,10 +4,10 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php' - file: src/PrestaShopBundle/Bridge/Helper/Listing/HelperBridge/HelperListBridge.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' + file: classes/controller/AdminController.php locations: - - 'front office' + - 'back office' type: action hookAliases: array_return: false @@ -23,8 +23,8 @@ description: '' ## Call of the Hook in the origin file ```php -dispatchWithParameters('action' . $helperListConfiguration->legacyControllerName . 'ListingResultsModifier', [ - 'list' => &$helperListConfiguration->list, - 'list_total' => &$helperListConfiguration->listTotal, +Hook::exec('action' . $this->controller_name . 'ListingResultsModifier', [ + 'list' => &$this->_list, + 'list_total' => &$this->_listTotal, ]) ``` diff --git a/modules/concepts/hooks/list-of-hooks/actionDeleteGDPRCustomer.md b/modules/concepts/hooks/list-of-hooks/actionDeleteGDPRCustomer.md index 1e90995787..7b81f9c420 100644 --- a/modules/concepts/hooks/list-of-hooks/actionDeleteGDPRCustomer.md +++ b/modules/concepts/hooks/list-of-hooks/actionDeleteGDPRCustomer.md @@ -6,7 +6,7 @@ files: - module: psgdpr url: 'https://github.com/PrestaShop/psgdpr/blob/master/src/Service/CustomerService.php' - file: modules/psgdpr/src/Service/CustomerService.php + file: src/Service/CustomerService.php locations: - 'front office' type: action diff --git a/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md b/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md index fc47716fcf..6e3d3f246d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md +++ b/modules/concepts/hooks/list-of-hooks/actionExportGDPRData.md @@ -4,8 +4,9 @@ hidden: true hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/modules/psgdpr/psgdpr.php' - file: modules/psgdpr/psgdpr.php + module: psgdpr + url: 'https://github.com/PrestaShop/psgdpr/blob/dev/psgdpr.php' + file: psgdpr.php locations: - 'front office' type: action @@ -13,7 +14,7 @@ hookAliases: array_return: false check_exceptions: false chain: false -origin: core +origin: module description: '' --- diff --git a/modules/concepts/hooks/list-of-hooks/actionMainMenuModifier.md b/modules/concepts/hooks/list-of-hooks/actionMainMenuModifier.md index 0923e7feac..1b4ac38d7d 100644 --- a/modules/concepts/hooks/list-of-hooks/actionMainMenuModifier.md +++ b/modules/concepts/hooks/list-of-hooks/actionMainMenuModifier.md @@ -4,8 +4,9 @@ hidden: true hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/modules/ps_mainmenu/ps_mainmenu.php' - file: modules/ps_mainmenu/ps_mainmenu.php + module: ps_mainmenu + url: 'https://github.com/PrestaShop/ps_mainmenu/blob/dev/ps_mainmenu.php' + file: ps_mainmenu.php locations: - 'front office' type: action @@ -13,7 +14,7 @@ hookAliases: array_return: false check_exceptions: false chain: false -origin: core +origin: module description: '' --- diff --git a/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md b/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md index 8841df078b..fd6a727eab 100644 --- a/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md +++ b/modules/concepts/hooks/list-of-hooks/actionWishlistAddProduct.md @@ -6,7 +6,7 @@ files: - module: blockwishlist url: 'https://github.com/PrestaShop/blockwishlist/blob/master/controllers/front/action.php' - file: modules/blockwishlist/controllers/front/action.php + file: controllers/front/action.php locations: - 'front office' type: action diff --git a/modules/concepts/hooks/list-of-hooks/displayBackOfficeEmployeeMenu.md b/modules/concepts/hooks/list-of-hooks/displayBackOfficeEmployeeMenu.md index c330b82850..292e96bbf2 100644 --- a/modules/concepts/hooks/list-of-hooks/displayBackOfficeEmployeeMenu.md +++ b/modules/concepts/hooks/list-of-hooks/displayBackOfficeEmployeeMenu.md @@ -1,11 +1,14 @@ --- -Title: displaybackOfficeEmployeeMenu +Title: displayBackOfficeEmployeeMenu hidden: true hookTitle: 'Administration Employee menu' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Bridge/Smarty/HeaderConfigurator.php' - file: src/PrestaShopBundle/Bridge/Smarty/HeaderConfigurator.php + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/controller/AdminController.php' + file: classes/controller/AdminController.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 diff --git a/modules/concepts/hooks/list-of-hooks/displayCartExtraProductInfo.md b/modules/concepts/hooks/list-of-hooks/displayCartExtraProductInfo.md index 2f5bb8f786..bf2a85759a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCartExtraProductInfo.md +++ b/modules/concepts/hooks/list-of-hooks/displayCartExtraProductInfo.md @@ -4,8 +4,9 @@ hidden: true hookTitle: 'Extra information in shopping cart product line' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/themes/hummingbird/templates/checkout/_partials/cart-detailed-product-line.tpl' - file: themes/hummingbird/templates/checkout/_partials/cart-detailed-product-line.tpl + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/checkout/_partials/cart-detailed-product-line.tpl + file: themes/hummingbird/templates/checkout/_partials/cart-detailed-product-line.tpl locations: - 'front office' type: display @@ -13,7 +14,7 @@ hookAliases: array_return: false check_exceptions: false chain: false -origin: core +origin: theme description: 'This hook adds extra information to the product lines, in the shopping cart' --- @@ -23,5 +24,5 @@ description: 'This hook adds extra information to the product lines, in the shop ## Call of the Hook in the origin file ```php -{hook h='displayCartExtraProductInfo' product=$product}; +{hook h='displayCartExtraProductInfo' product=$product} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayCustomerAccountTop.md b/modules/concepts/hooks/list-of-hooks/displayCustomerAccountTop.md index 82c4f03cb1..386ed5ec0f 100644 --- a/modules/concepts/hooks/list-of-hooks/displayCustomerAccountTop.md +++ b/modules/concepts/hooks/list-of-hooks/displayCustomerAccountTop.md @@ -4,8 +4,9 @@ hidden: true hookTitle: 'Customer account displayed in Front Office (Top part)' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/themes/hummingbird/templates/customer/my-account.tpl' - file: themes/hummingbird/templates/customer/my-account.tpl + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/customer/my-account.tpl + file: themes/hummingbird/templates/customer/my-account.tpl locations: - 'front office' type: display @@ -13,7 +14,7 @@ hookAliases: array_return: false check_exceptions: false chain: false -origin: core +origin: theme description: 'This hook displays new elements on the customer account page on Top' --- @@ -23,5 +24,5 @@ description: 'This hook displays new elements on the customer account page on To ## Call of the Hook in the origin file ```php -{hook h='displayCustomerAccountTop'}; +{hook h='displayCustomerAccountTop'} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayFeaturePostProcess.md b/modules/concepts/hooks/list-of-hooks/displayFeaturePostProcess.md index 8d829347ae..e860ed434a 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFeaturePostProcess.md +++ b/modules/concepts/hooks/list-of-hooks/displayFeaturePostProcess.md @@ -2,10 +2,7 @@ Title: displayFeaturePostProcess hidden: true hookTitle: 'On post-process in admin feature' -files: - - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminFeaturesController.php' - file: controllers/admin/AdminFeaturesController.php +files: { } locations: - 'back office' type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayFeatureValueForm.md b/modules/concepts/hooks/list-of-hooks/displayFeatureValueForm.md index 1359d1e801..76d2e4bb9b 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFeatureValueForm.md +++ b/modules/concepts/hooks/list-of-hooks/displayFeatureValueForm.md @@ -2,10 +2,7 @@ Title: displayFeatureValueForm hidden: true hookTitle: "Add fields to the form 'feature value'" -files: - - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.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 +files: { } locations: - 'back office' type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayFeatureValuePostProcess.md b/modules/concepts/hooks/list-of-hooks/displayFeatureValuePostProcess.md index c4f9e89b72..0b5da23c59 100644 --- a/modules/concepts/hooks/list-of-hooks/displayFeatureValuePostProcess.md +++ b/modules/concepts/hooks/list-of-hooks/displayFeatureValuePostProcess.md @@ -2,10 +2,7 @@ Title: displayFeatureValuePostProcess hidden: true hookTitle: 'On post-process in admin feature value' -files: - - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/controllers/admin/AdminFeaturesController.php' - file: controllers/admin/AdminFeaturesController.php +files: { } locations: - 'back office' type: display diff --git a/modules/concepts/hooks/list-of-hooks/displayModalContent.md b/modules/concepts/hooks/list-of-hooks/displayModalContent.md index 3adcd4a283..ada3002047 100644 --- a/modules/concepts/hooks/list-of-hooks/displayModalContent.md +++ b/modules/concepts/hooks/list-of-hooks/displayModalContent.md @@ -4,8 +4,9 @@ hidden: true hookTitle: '' files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/themes/hummingbird/templates/layouts/layout-both-columns.tpl' - file: themes/hummingbird/templates/layouts/layout-both-columns.tpl + theme: hummingbird + url: https://github.com/PrestaShop/hummingbird/blob/develop/templates/layouts/layout-both-columns.tpl + file: themes/hummingbird/templates/layouts/layout-both-columns.tpl locations: - 'front office' type: display @@ -13,7 +14,7 @@ hookAliases: array_return: false check_exceptions: false chain: false -origin: core +origin: theme description: '' --- @@ -23,5 +24,5 @@ description: '' ## Call of the Hook in the origin file ```php -{hook h='displayModalContent'}; +{hook h='displayModalContent'} ``` diff --git a/modules/concepts/hooks/list-of-hooks/displayMyAccountBlock.md b/modules/concepts/hooks/list-of-hooks/displayMyAccountBlock.md index ab8eb67462..073e642529 100644 --- a/modules/concepts/hooks/list-of-hooks/displayMyAccountBlock.md +++ b/modules/concepts/hooks/list-of-hooks/displayMyAccountBlock.md @@ -2,10 +2,7 @@ Title: displayMyAccountBlock hidden: true hookTitle: 'My account block' -files: - - - url: '' - file: '' +files: { } locations: - 'front office' type: display diff --git a/modules/concepts/hooks/list-of-hooks/gSitemapAppendUrls.md b/modules/concepts/hooks/list-of-hooks/gSitemapAppendUrls.md index 57b909be2a..e090a1b2b6 100644 --- a/modules/concepts/hooks/list-of-hooks/gSitemapAppendUrls.md +++ b/modules/concepts/hooks/list-of-hooks/gSitemapAppendUrls.md @@ -4,8 +4,9 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/modules/gsitemap/gsitemap.php' - file: modules/gsitemap/gsitemap.php + module: gsitemap + url: 'https://github.com/PrestaShop/gsitemap/blob/dev/gsitemap.php' + file: gsitemap.php locations: - 'front office' type: null @@ -13,7 +14,7 @@ hookAliases: array_return: true check_exceptions: false chain: false -origin: core +origin: module description: '' --- diff --git a/modules/concepts/hooks/list-of-hooks/legacyblockkpi.md b/modules/concepts/hooks/list-of-hooks/legacyblockkpi.md index 16041399ce..f5069d2d29 100644 --- a/modules/concepts/hooks/list-of-hooks/legacyblockkpi.md +++ b/modules/concepts/hooks/list-of-hooks/legacyblockkpi.md @@ -4,8 +4,8 @@ hidden: true hookTitle: files: - - url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/catalog.html.twig' - file: src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/catalog.html.twig + url: 'https://github.com/PrestaShop/PrestaShop/blob/9.1.x/src/Adapter/Admin/LegacyBlockHelperSubscriber.php' + file: src/Adapter/Admin/LegacyBlockHelperSubscriber.php locations: - 'back office' type: null