The beloved MessageBox plugin has been a staple of the ColdBox platform since the beginning. With ColdBox 4.0 it's still available, but if you don't need it, you have the freedom to leave it out.
The new modular approach (and deprecation of plugins) of ColdBox 4.0 means much of its built-in functionality has been moved to separate, installable modules. One of the many new modules introduced with ColdBox 4.0 is the MessageBox Module. To install, simply fire up CommandBox:
box install cbmessagebox
For the plugin, you might have had code like this:
getPlugin("MessageBox").info( "Hello" );
With the module, your syntax changes slightly to:
getInstance("messagebox@cbmessagebox").info( "Hello" );
or, leveraging WireBox:
property name="messagebox" inject="messagebox@cbmessagebox"; ... variables.messagebox.info( "Hello" );
Happy messaging!
Add Your Comment