Observers when items get created/updated/deleted

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
FedericoCánovas
Posts: 7
Joined: 16 Jul 2018, 17:50

Observers when items get created/updated/deleted

Post by FedericoCánovas » 08 Oct 2018, 11:56

I need to fire an action when an item has been created, updated or deleted (i.e.: products, attributes, categories...)

Is there anyway to attach an observer to items or trigger an event in laravel?

Thanks

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Observers when items get created/updated/deleted

Post by aimeos » 09 Oct 2018, 19:43

You can write a decorator for the manager classes that intercepts the method calls (deleteItem, deleteItems, saveItem and saveItems) to perform additional actions like this one:
https://github.com/aimeos/aimeos-core/b ... ngelog.php

You can configure your decorator for all managers using this setting:
https://aimeos.org/docs/Configuration/C ... rs/default
https://aimeos.org/docs/Configuration/C ... rs/default
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply