You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2021-07-23 15:07:01

maribert
Member
Registered: 2021-05-18
Posts: 9

Problem with The Hook Function with dashboard_cards

Hello,

I got an issue with the doHookFunction in the grid class (line 1448).
I got 3 plug-in that implements new cards for my dashboard.
The problem is that it seems that the doHookFunction take only the cards of one plug-in and then returns it.
It seems that i cant have few plug-in that return cards.
How can i make the HookFunction take the cards of my three plugins?

Thank for your answers.
Have a great day!

Offline

#2 2021-07-24 23:03:49

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,395
Website

Re: Problem with The Hook Function with dashboard_cards

The hook passes the current cards to the function. Your function should add its cards to the array and then return it.
I made this mistake in one of my plugins. See the fix made for my plugin:
https://github.com/cconard96/jamf/pull/75


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#3 2021-07-26 10:05:47

maribert
Member
Registered: 2021-05-18
Posts: 9

Re: Problem with The Hook Function with dashboard_cards

Thank you smile

Offline

Board footer

Powered by FluxBB