Fórum

Use of hook into ext

Varsha Ajane, modificado 9 Anos atrás.

Use of hook into ext

Junior Member Postagens: 30 Data de Entrada: 10/12/14 Postagens Recentes
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 9 Anos atrás.

RE: Use of hook into ext

Liferay Legend Postagens: 14918 Data de Entrada: 02/09/06 Postagens Recentes
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 9 Anos atrás.

RE: Use of hook into ext

Liferay Master Postagens: 875 Data de Entrada: 07/01/11 Postagens Recentes
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 8 Anos atrás.

RE: Use of hook into ext

Junior Member Postagens: 30 Data de Entrada: 10/12/14 Postagens Recentes
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