Foros de discusión

Use of hook into ext

Varsha Ajane, modificado hace 9 años.

Use of hook into ext

Junior Member Mensajes: 30 Fecha de incorporación: 10/12/14 Mensajes recientes
Hi,

I have one hook plugin project with say getMyUser() method in one of the class. I have created one ext-plugin project in which to complete my requirement I have to implement the same getMyUser() method. My question can I access the plugin-project method diretly into my ext-project. If yes then how?

Thanks... emoticon
thumbnail
David H Nebinger, modificado hace 9 años.

RE: Use of hook into ext

Liferay Legend Mensajes: 14916 Fecha de incorporación: 2/09/06 Mensajes recientes
No need to. Eliminate the hook and put the getMyUser() method in the ext. It would then also be available to all plugins that need it.
thumbnail
Jitendra Rajput, modificado hace 9 años.

RE: Use of hook into ext

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
You can move common method from hook to ext-service (inside ext-plugin) . Once ext plugin deployed you would be able to access the common method inside your Hook.

Thank you,
Jitendra
Varsha Ajane, modificado hace 8 años.

RE: Use of hook into ext

Junior Member Mensajes: 30 Fecha de incorporación: 10/12/14 Mensajes recientes
Hi Jitendra/David,

as you say for ext, is it applicable to portlet also? I have a certain code in a hook, which now I want to use in portlet. Is this possible?

In detail my requirement is like:

In hook, I have developed a code for user manipulation while they are registering, also there are some web service calls.
Now I have to register 500 users that I'll import from a XML sheet for which I have created a separate portlet and while registering these users I have to call the hook user methods.

How do I achieve this? Plz help.

Thanks in advance. emoticon