Skip to content

Commit

Permalink
Merge pull request #1681 from nenes25/actionListModules
Browse files Browse the repository at this point in the history
Add documentation for hook actionListModules
  • Loading branch information
kpodemski authored Jun 22, 2023
2 parents f84c19a + dacc3cd commit 188112e
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions modules/concepts/hooks/list-of-hooks/actionListModules.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 188112e

Please sign in to comment.