Answer the question
In order to leave comments, you need to log in
How to detach an event handler?
The component that implements the \yii\base\BootstrapInterface interface has an event attached to the bootstrap() method. This component is always loaded when the application is loaded. It is not called anywhere else.
How can I get an instance of this component (the one that was loaded with the application via bootstrap)?
How can I detach an event from this component from another class?
Answer the question
In order to leave comments, you need to log in
detach the handler https://yiiframework.com.ua/ru/doc/guide/2/concept... but given that it is hung in the bootstrap, most likely it will also have to be disabled in the bootstrap or somehow at the config level.
Get a component instance Yii::$app->get('componentId') or Yii::$container->get('component-class-name') depending on the situation
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question