如何在socialengine4中更改核心模块文件 [英] How to change core module files in socialengine4

查看:77
本文介绍了如何在socialengine4中更改核心模块文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发socialengine4中的模块.现在,我需要更改应用程序的核心功能.我需要通过添加一些核心功能(如证明自动完成字段)来对用户注册过程进行一些更改.

I am developing modules in socialengine4. Now I need to change the core functionality of the application. I need to make some changes in user signup process by adding some core features like proving auto complete fields.

我知道这是User module of SocialEngine的核心功能.但是This is not a good practice because any update of socialengine will override my changes.

I know this is a core feature of User module of SocialEngine. But This is not a good practice because any update of socialengine will override my changes.

我已经搜索了解决方案,但找不到任何东西.我知道您是否想更改magento核心模块中的任何内容,它会指导我们执行此操作的特定方法.同样,我想知道这个过程,我该如何改变社交引擎?

I have searched the solution but couldn't be able to find any thing. I know if you want to change any thing in core modules of magento, it directs us specific way to do that. Similarly I want to know the process, how can I change in socialengine?

致谢

推荐答案

这取决于您要在SocialEngine核心上进行的更改.

It depends on what you want to change on SocialEngine core.

要更改注册过程(例如,添加新步骤),您必须在此表中添加新行engine4_user_signup并实施新步骤.

To change the signup process (for example add a new step), you have to add a new row in this table engine4_user_signup and implement your new step.

如果您只想在用户注册成功后添加一些操作,则可以在自定义模块中添加一个挂钩.

If you just want to add some actions after a user signup successfully, you can add a Hook in your custom module.

要在Socialengine中实现钩子,请执行以下步骤: 在清单文件中定义钩子,如下所示

To implement a hook in Socialengine, following these steps: Define hook in manifest file, will be something like below

'hooks' => array(
    array(
      'event' => 'onUserCreateAfter',
      'resource' => 'YourPluginName_Plugin_Signup',
    ),
  ),

在插件类YourPluginName_Plugin_Signup中,在UserCreateAfter上添加此方法

In the plugin class YourPluginName_Plugin_Signup, add this method onUserCreateAfter

public function onUserCreateAfter($payload)
{
    $user = $payload->getPayload();
    //Do whatever you want
}

希望这可以为您提供帮助.

Hope this can help you.

这篇关于如何在socialengine4中更改核心模块文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆