router = $router; $this->decorator = $decorator; } /** * Enable REST API integration */ protected function enabled() { add_action( 'carbon_fields_fields_registered', array( $this, 'boot' ) ); } /** * Disable REST API integration */ protected function disabled() { remove_action( 'carbon_fields_fields_registered', array( $this, 'boot' ) ); } /** * Bootstrap all functionality */ public function boot() { $this->router->boot(); $this->decorator->boot(); } }