{#** * Copyright since 2007 PrestaShop SA and Contributors * PrestaShop is an International Registered Trademark & Property of PrestaShop SA * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.md. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://devdocs.prestashop.com/ for more information. * * @author PrestaShop SA and Contributors * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) *#} {% extends '@WebProfiler/Profiler/layout.html.twig' %} {% import _self as helper %} {% block toolbar %} {% set icon %} {{ include('@WebProfiler/Icon/event.svg') }} Hooks ({{ collector.calledHooks|length }}) {% endset %} {% set text %}
{{ collector.calledHooks|length }} Hooks called and received by modules
{% for hookName, hooks in collector.calledHooks %} {% else %} {% endfor %}
Hook name Call(s)
{{ hookName }}{{ hooks|length }}
No hook dispatched.
{% endset %} {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: true }) }} {% endblock %} {% block menu %} {# This left-hand menu appears when using the full-screen profiler. #} {{ include('@WebProfiler/Icon/event.svg') }} Hooks {% endblock %} {% block panel %}

Hooks

{% if collector.notCalledHooks is empty %}

No Hooks have been recorded. Check that debugging is enabled in the kernel.

{% else %}

Hooks called and received by modules {{ collector.calledHooks|length }}

These hooks have been dispatched by PrestaShop and there are active modules listening and receiving them.

{{ helper.render_table(collector.calledHooks, true) }}

Hooks called but not received by modules {{ collector.notCalledHooks|length }}

These hooks have been dispatched by PrestaShop but no modules have subscribed to them.

{% if collector.notCalledHooks is empty %}

There are no uncalled hooks.

All hooks were called for this request or an error occurred when trying to collect uncalled listeners (in which case check the logs to get more information).

{% else %} {{ helper.render_table(collector.notCalledHooks, false) }} {% endif %}

Not registered hooks {{ collector.notRegisteredHooks|length }}

These hooks have been dispatched by PrestaShop but they are not registered in the database, meaning no modules registered them and they were not added in the hook fixtures for core hooks.

{% if collector.notRegisteredHooks is empty %}

There are no unregistered hooks.

Seems like all hooks had appropriate listeners so they were all correctly registered in the database.

{% else %} {{ helper.render_table(collector.notRegisteredHooks, false) }} {% endif %}
{% endif %} {% endblock %} {% macro render_table(hookList, hookModules) %} {% for hookName, hooks in hookList %}

{{ hookName }}

{% if hookModules %} {% endif %} {% for position, hook in hooks %} {% if hookModules %} {% endif %} {% endfor %}
Arguments LocationHooked modules
{{ profiler_dump(hook.args) }} {{ hook.location }} {% set modules = hook.modules %} {% for moduleName, module in modules %}

{{ moduleName|capitalize }}

{% if module.callback is defined %} {% else %} {% endif %}
Module arguments
{{ profiler_dump(module.callback.args) }}
{{ profiler_dump(module.widget.args) }}
{% endfor %}
{% endfor %} {% endmacro %}