coldbox create handler

Aliases: 
  • coldbox create controller
  •  
    Parameters:
    Name Type Required Default Hint
    name string true Name of the handler to create without the .cfc. For packages, specify name as 'myPackage/myHandler'
    actions string false A comma-delimited list of actions to generate
    views boolean false true Generate a view for each action
    viewsDirectory string false views The directory where your views are stored. Only used if views is set to true.
    integrationTests boolean false true Generate the integration test component
    appMapping string false / The root location of the application in the web root: ex: /MyApp or / if in the root
    testsDirectory string false tests/specs/integration Your integration tests directory. Only used if integrationTests is true
    directory string false handlers The base directory to create your handler in and creates the directory if it does not exist. Defaults to 'handlers'.
    script boolean false true Generate content in script markup or tag markup
    description string false I am a new handler The handler hint description
    open boolean false false Open the handler (and test(s) if applicable) once generated

    Command Usage

    Create a new handler (controller) in an existing ColdBox application. Make sure you are running this command in the root
    of your app for it to find the correct folder. You can optionally create the views as well as the integration tests for your
    new handler at the same time. By default, your new handler will be created in /handlers but you can override that with the directory param.

    coldbox create handler myHandler index,foo,bar --open