Skip to content

Commit

Permalink
Update readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
Wojdylak committed Mar 1, 2024
1 parent b3e2f70 commit a411ce4
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ Symfony Flex, it's much quicker! :)
## Extension points
Majority of actions contained in SyliusInvoicingPlugin is executed once an event after changing the state of
the Order on `winzou_state_machine` is dispatched.
Majority of actions contained in SyliusInvoicingPlugin is executed once an event after changing the state of the Order.
Here is the example:
Here is the example for `winzou_state_machine`:
```yaml
winzou_state_machine:
Expand All @@ -92,6 +91,17 @@ winzou_state_machine:
Code placed above is a part of configuration placed in `config.yml` file.
You can customize this file by adding new state machine events listeners or editing existing ones.
Here is the example for Symfony's `workflow`:

```xml
<service id="sylius_invoicing_plugin.event_listener.workflow.payment.produce_order_payment_paid"
class="Sylius\InvoicingPlugin\EventListener\Workflow\Payment\ProduceOrderPaymentPaidListener">
<argument type="service" id="sylius_invoicing_plugin.event_producer.order_payment_paid" />
<tag name="kernel.event_listener" event="workflow.sylius_payment.completed.complete" priority="100" />
</service>
```

Apart from that an Invoice model is treated as a Resource.

You can read more about Resources here:
Expand Down

0 comments on commit a411ce4

Please sign in to comment.