留言板

Use of hook into ext

Varsha Ajane,修改在9 年前。

Use of hook into ext

Junior Member 帖子: 30 加入日期: 14-12-10 最近的帖子
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,修改在9 年前。

RE: Use of hook into ext

Liferay Legend 帖子: 14914 加入日期: 06-9-2 最近的帖子
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,修改在9 年前。

RE: Use of hook into ext

Liferay Master 帖子: 875 加入日期: 11-1-7 最近的帖子
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,修改在8 年前。

RE: Use of hook into ext

Junior Member 帖子: 30 加入日期: 14-12-10 最近的帖子
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