PrestaShop Developer Conference
PrestaShop Developer Conference
Paris, France - November 6, 2024
Let's talk code, commerce and open source.

Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.

You might want to read the documentation for the current version, PrestaShop 8. Read the current version of this page

Hook actionBuildMailLayoutVariables

Informations

Build the variables used in email layout rendering This hook allows to change the variables used when an email layout is rendered
Hook actionBuildMailLayoutVariables
Locations
FO
Type action
Origin core
Aliases

Located in

Origin File
core src/Core/MailTemplate/Layout/LayoutVariablesBuilder.php

Call of the Hook in the origin file

dispatchWithParameters(
            LayoutVariablesBuilderInterface::BUILD_MAIL_LAYOUT_VARIABLES_HOOK,
            [
                'mailLayout' => $mailLayout,
                'mailLayoutVariables' => &$mailLayoutVariables,
            ]
        )

Example implementation

This hook has been implemented as an example in our modules examples repository - example_module_mailtheme.