kevinohara80 / sfdc-trigger-framework

A minimal trigger framework for your Salesforce Apex Triggers
MIT License
952 stars 515 forks source link

Changed bypassHandler related methods to static #2

Closed loganm closed 10 years ago

loganm commented 10 years ago

The methods to manipulate the bypassHandlers list were instance methods, which meant you had to have an instance of TriggerHandler to touch them.

That's not a problem inside a TriggerHandler instance. You can just call this.bypass(...). But it's a bit messy outside of a TriggerHandler instance. You have to create a TriggerHandler instance first, new TriggerHandler().bypass(...).

I made the methods static and from anywhere (inside or outside a TriggerHandler instance) I call TriggerHandler.bypass(...).

kevinohara80 commented 10 years ago

Yup, makes sense.