[Koha-devel] Plugin hooks on datas and store()

Jonathan Druart jonathan.druart at bugs.koha-community.org
Mon Mar 8 11:49:25 CET 2021


I wouldn't add other hooks, they are "_after_item_action_hooks" for
creation and modification.
"After item creation" should allow you to modify the item, unless we need a
"pre store" hook.
I had a look at the code and I didn't find any problems.
Fridolin, what did you try exactly, can you share the code?

Le lun. 8 mars 2021 à 11:17, Tomas Cohen Arazi <tomascohen at gmail.com> a
écrit :

> Maybe you need some other hook. Ones that allows you to make changes to
> the object right before it is stored instead of this one, that gets the
> 'just updated' object.
> When I added 'after' hooks for biblios and items actions, the idea was
> that they should act as triggers for other actions: in my case, fill a
> zebraqueue-ish table my plugin uses.
>
> El lun, 8 mar 2021 a las 5:11, Fridolin SOMERS (<
> fridolin.somers at biblibre.com>) escribió:
>
>> Hi,
>>
>> While testing new hook :
>> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066
>>
>> I faced a problem :
>> How can I modify the current patron object ?
>> Since we are in the store() method of that object and inside a transation.
>> I tried to call $self->SUPER::store(); but does not work.
>>
>> Should we implement this possiblity or document hooks to say it is
>> impossible.
>>
>> Thanks a lot for your help :D
>>
>> Best regards,
>>
>> --
>> Fridolin SOMERS <fridolin.somers at biblibre.com>
>> Software and system maintainer 🦄
>> BibLibre, France
>> _______________________________________________
>> Koha-devel mailing list
>> Koha-devel at lists.koha-community.org
>> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
>> website : https://www.koha-community.org/
>> git : https://git.koha-community.org/
>> bugs : https://bugs.koha-community.org/
>>
>
>
> --
> Tomás Cohen Arazi
> Theke Solutions (http://theke.io)
> ✆ +54 9351 3513384
> GPG: B2F3C15F
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : https://www.koha-community.org/
> git : https://git.koha-community.org/
> bugs : https://bugs.koha-community.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210308/c12f8f59/attachment.htm>


More information about the Koha-devel mailing list