Delegates
Compose ColdBox superpowers into any object via WireBox delegation
Two Namespaces
Namespace
Description
Registered by
Quick Start
// A model that can render views, read settings, and build links
class
delegates="Rendering@cbDelegates,
Settings@cbDelegates,
Routable@cbDelegates" {
function getWidget( required string name ) {
var config = getSetting( "widgets" )
return view( "widgets/#name#", { config : config } )
}
function getLink() {
return buildLink( "home.index" )
}
}// A model that can render views, read settings, and build links
component
delegates="Rendering@cbDelegates,
Settings@cbDelegates,
Routable@cbDelegates" {
function getWidget( required string name ) {
var config = getSetting( "widgets" )
return view( "widgets/#name#", { config : config } )
}
function getLink() {
return buildLink( "home.index" )
}
}Available Delegates
Core Delegates (@coreDelegates)
@coreDelegates)WireBox ID
Description
ColdBox Delegates (@cbDelegates)
@cbDelegates)WireBox ID
Description
Last updated
Was this helpful?