Adding testing hooks

This commit is contained in:
Jordan
2026-03-21 10:12:15 +00:00
parent 96dac31a85
commit 34a3326bdd

View File

@@ -4,6 +4,16 @@
Hooks are PHP files in the `hooks/` directory that execute server-side logic. They can also live inside a module at `template/estandar/modulos/<module-id>/hook.php`.
### Testing Hooks
To test hooks, the site's Docker container must be running. Make a curl request to the Docker URL with the hook path. For example, if a hook is located at `hooks/example_hook/`:
```bash
curl http://{DOCKER_URL_AND_PORT}/hooks/example_hook/
```
Replace `{DOCKER_URL_AND_PORT}` with your local Docker address (e.g., `localhost:8080`).
### How to Call Hooks
**From Twig:**