Adding testing hooks
This commit is contained in:
@@ -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`.
|
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
|
### How to Call Hooks
|
||||||
|
|
||||||
**From Twig:**
|
**From Twig:**
|
||||||
|
|||||||
Reference in New Issue
Block a user