You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$targetList = $this->shoppingListService->getShoppingList($targetList->getIdentifier()); // Refresh local object from persistence
85
+
$sourceList = $this->shoppingListService->removeEntries($sourceList, $entriesToRemove); // Refresh local object from persistence even if $entriesToRemove is empty
86
+
```
87
+
88
+
When the shopping list service methods are called, event are dispatched before and after the action so its parameters or results can be customized.
89
+
TODO: Event example?
90
+
For more information, see [Shopping list event reference](shopping_list_events.md).
91
+
92
+
Interactions between shopping list and cart are managed by
TODO: example and reco. Maybe clarify duplicate handling of this case methods
74
96
75
97
There is no specific event for the transfer operations.
76
98
77
99
- When adding from shopping list to cart, the `Ibexa\Contracts\Cart\Event\BeforeAddEntryEvent` and `Ibexa\Contracts\Cart\Event\AddEntryEvent` are dispatched for each entry that weren't previously in the cart.
78
100
- When moving from cart to shopping list, `Ibexa\Contracts\ShoppingList\Event\BeforeAddEntriesEvent` and `Ibexa\Contracts\ShoppingList\Event\AddEntriesEvent` are dispatched for the batch of entries that weren't already in the shopping list,
79
101
then `Ibexa\Contracts\Cart\Event\BeforeRemoveEntryEvent` and `Ibexa\Contracts\Cart\Event\BeforeRemoveEntryEvent` are dispatched for each entry removed from the cart.
80
102
81
-
82
103
## REST API
83
104
84
105
The REST API has several resources to manage shopping lists and their entries
0 commit comments