[Koha-bugs] [Bug 22709] Add hooks to notify plugins of biblio and item changes

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 3 23:19:29 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22709

Josef Moravec <josef.moravec at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #91224|0                           |1
        is obsolete|                            |

--- Comment #13 from Josef Moravec <josef.moravec at gmail.com> ---
Created attachment 91245
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91245&action=edit
Bug 22709: Add after biblio/item action hooks

This patch introduces after-action hooks for
- C4::Biblio::{Add|Mod|Del}Biblio
- C4::Items::{Add|Mod|Del}Biblio

After the action has taken place, a call to a helper method is done,
which loops through all plugins implementing the hooks, and calls the
plugin method. The related object is passed, along with an 'action'
string specifying the action that took place, and the object id (which
is specially important for the 'Del' case).

To test:
- Apply this patchset
- Run:
  $ kshell
 k$ prove t/db_dependent/Biblio_and_Items_plugin_hooks.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec at gmail.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list