ColdBox HMVC Documentation
7.x
SourceNewsSupportTraining
Search…
⌃K
Links
7.x
Introduction
Intro
Release History
About This Book
For Newbies
60 Minute Quick Start
Getting Started
Getting Started Guide
Installation
Conventions
Configuration
The Basics
Request Context
Routing
Event Handlers
Layouts & Views
Models
Interceptors
How do they work?
Interceptor Declaration
Interceptor Registration
Dynamic Registration
Core Interception Points
Restricting Execution
Interceptor Output Buffer
Custom Events
Unregistering Interceptors
Reporting Methods
Interceptor Asynchronicity
HMVC
Modules
Testing
Testing Quick Start
Testing ColdBox Applications
Digging Deeper
Async Programming
ColdBox Proxy
Controller Decorator
Flash RAM
HTML Helper
REST Handler
Request Context Decorator
Recipes
Scheduled Tasks
Architecture Concepts
What is MVC
What is ColdBox
How ColdBox Works
Testing Concepts
External links
Source code
Issue tracker
LogBox
CacheBox
WireBox
Powered By GitBook

Dynamic Registration

Instead of creating an Interceptor and registering this interceptor programmatically or in configuration, you can do this directly in code by registrering one-off closures with the new listen supertype.
controller.getInterceptorService().listen( function(){
log.info( "executing from closure listener")
}, "preProcess" );
Previous
Interceptor Registration
Next
Core Interception Points
Last modified 3mo ago
Copy link
Edit on GitHub