Document hook_products_changed (replaces 2 other hooks)
This commit is contained in:
parent
69fa5af0d1
commit
7b2fc96b19
1 changed files with 3 additions and 9 deletions
|
@ -189,19 +189,13 @@ Called when a new user account was created.
|
||||||
|
|
||||||
Called when a user account is updated.
|
Called when a user account is updated.
|
||||||
|
|
||||||
=item hook_product_changed($class, $old, $new, $mtime, @)
|
=item hook_products_changed($class, $changes, $mtime, @)
|
||||||
|
|
||||||
Called when a product is changed. For new products, C<$old> will be undef.
|
Called after reading a changed products file. C<$changes> is a reference to an array of C<[old, new]> pairs. For new products, C<old> will be undef. For deleted products, C<new> will be undef.
|
||||||
|
|
||||||
Caveats: Only things that change during runtime cause this hook to be called. When multiple revbank instances are running, each process gets this hook. When the products file is modified externally, the new file is loaded only after user interaction. When a product's primary id changes, it is registerd as a deletion and addition, not a change.
|
|
||||||
|
|
||||||
The mtime is the mtime of the products file, not necessarily when the product was changed.
|
The mtime is the mtime of the products file, not necessarily when the product was changed.
|
||||||
|
|
||||||
=item hook_product_deleted($class, $product, $mtime, @)
|
Caveats: Only things that change during runtime cause this hook to be called. When multiple revbank instances are running, each process gets this hook. When the products file is modified externally, the new file is loaded only after user interaction. When a product's primary id changes, it is registered as a deletion and addition, not a change.
|
||||||
|
|
||||||
Called when a product is deleted.
|
|
||||||
|
|
||||||
The same caveats like for C<hook_product_changed> apply.
|
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue