We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Force events not to be launched.

Hello, people,

I have a function that updates me a field of several tables, when I save is launched events.

I don't want any event to be triggered, is there a way to force nothing to be triggered?



8.4k

events to be triggered must have an event listener to work you need to be more specific

Which events are triggered that you want to stop. Components, Plugins, and Controllers can be event listeners by creating methods in their class. To prevent those events from being listened to, simply removed that method.

More details would be helpful to provide a better answer.

You can only do this globally setting:

Model::setup(
    [
        'events'         => false,
    ]
);