Inside an event module - Do I need to check for the event?

Moderator: crythias

Locked
shostakovich
Znuny advanced
Posts: 146
Joined: 11 Apr 2011, 08:11
Znuny Version: 3.2.5

Inside an event module - Do I need to check for the event?

Post by shostakovich »

Hi,

in module registration, I already tell the system when to trigger the module:

Code: Select all

    $Self->{'Ticket::EventModulePost'}->{'137-FixInbox'} =  {
      'Event' => '(TicketTypeUpdate)',
      'Module' => 'Kernel::System::Ticket::Event::FixInbox'
    };
So, I don't necessarily need conditional checks like the following inside the module, right?

Code: Select all

if ( $Param{Event} eq 'TicketTypeUpdate' ) ..
TIA
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Inside an event module - Do I need to check for the even

Post by crythias »

No, you don't need to check for an event, unless someone changes the config and the additional event doesn't work the same as the default event.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked