Jump to content

Change behavior of ProcessList.module with hooks


Orkun
 Share

Recommended Posts

Hi Guys

I have a question about the ProcessList.module in /wire/modules/. When I add a summary field to the admin template, the module takes the value of the summary field and outputs it, when it doesn't find a summary field it takes the summary value of the getModuleInfo(). How can I alter the behavior of ProcessList::render with Hooks so that I can also use another field than summary? 

Link to comment
Share on other sites

Hi Nukro,

The only hookable method is ProcessList::execute(). This means you'd have to hook after this method and copy all logic which is a lot of code to duplicate. Another approach that could work is something like this:

  1. Hook before ProcessList::execute() and temporarily assign the content of your desired field to the summary field
  2. Hook after ProcessList::execute() and undo the above again

Cheers

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...