Project

General

Profile

Need help in understanding hooks

Added by Trishul Mukherjee over 15 years ago

Hi all,

I am pretty new to Redmine and Rails in general. I wish to understand the concept of hooks in Redmine.
Any help is appreciated.

Thanks,
TP


Replies (1)

RE: Need help in understanding hooks - Added by Eric Davis over 15 years ago

I'm planning to write about them soon but here's a quick overview:

  • A plugin hook is a method that will be run at specific time
  • If the hook returns a string, that string will be rendered to the view
  • Each hook gets a single Hash of parameters, called the context. This will contain data based on which hook is used (e.g. :view_welcome_index_right will have access to the current Project in :project)

The discussion on #1677 and the Hooks page might also be helpful.

Eric

    (1-1/1)