2021-10-17 18:26:00 +02:00
|
|
|
---
|
2022-09-30 15:34:59 +02:00
|
|
|
title: Lifecycle hooks
|
2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-30 15:34:59 +02:00
|
|
|
FreeSewing has **lifecycle hooks** that allow you extend its functionality by
|
|
|
|
hooking into a lifecycle event.
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2024-09-28 13:13:48 +02:00
|
|
|
Through the [use of a plugin](/guides/plugins#hook-methods), you can register a method
|
2022-10-12 21:53:11 +02:00
|
|
|
for a hook. When the hook is triggered, your method will be called. It will
|
|
|
|
receive two parameters:
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-02-20 14:44:38 +01:00
|
|
|
- An object relevant to the hook (see the specific hook for details)
|
|
|
|
- Data passed when the hook was registered (optional)
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-30 00:36:16 +02:00
|
|
|
Below is a list of all available lifecycle hooks:
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2024-01-29 08:43:38 -08:00
|
|
|
<ReadMore />
|
2022-09-30 00:36:16 +02:00
|
|
|
|
|
|
|
|