Unregistering Interceptors

Last updated last month

Each interceptor can unregister itself from any event by using the unregister( state ) method. This method is found in all Interceptors or can be accessed via the interceptor service as well.

// Inside an interceptor
unregister( 'preProcess' );
‚Äč
// From the interceptor service
controller.getInterceptorService()
.unregister( interceptorName="MyInterceptor", state="preProcess" );