ColdBox HMVC Documentation
7.x
DocsSourceSupportTraining
Search
⌃K
Links
Introduction
For Newbies
60 Minute Quick Start
Getting Started Guide
Getting Started
Installation
Application Templates
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
ColdBox Scheduled Tasks
Flash RAM
HTML Helper
REST Handler
Request Context Decorator
Recipes
Architecture Concepts
How ColdBox Works
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 6mo ago
Export as PDF
Copy link
Edit on GitHub