diff --git a/modules/concepts/hooks/list-of-hooks/actionListModules.md b/modules/concepts/hooks/list-of-hooks/actionListModules.md new file mode 100644 index 0000000000..b93cb4e8eb --- /dev/null +++ b/modules/concepts/hooks/list-of-hooks/actionListModules.md @@ -0,0 +1,36 @@ +--- +menuTitle: actionListModules +Title: actionListModules +hidden: true +hookTitle: Allows you to add your own modules from a remote source in the modules list in the back office. +files: + - src/Core/Module/ModuleRepository.php +locations: + - back office +type: action +hookAliases: +hasExample: true +--- + +# Hook actionListModules {{< minver v="8.0" >}} + +## Information + +Hook locations: +- back office + +Hook type: action + +Located in: +- [src/Core/Module/ModuleRepository.php](https://github.com/PrestaShop/PrestaShop/blob/8.0.x/src/Core/Module/ModuleRepository.php) + +## Call of the Hook in the origin file + +```php +$modulesFromHook = $this->hookManager->exec('actionListModules', [], null, true); +$modulesFromHook = array_values($modulesFromHook ?? []); +``` + +## Example implementation + +This hook has been implemented in the native [ps_distributionapiclient](https://github.com/PrestaShop/ps_distributionapiclient/tree/master) module \ No newline at end of file