coldbox create controller

Aliases: 
  • coldbox create handler
  •  
    Parameters:
    Name Type Required Default Hint
    name string true Name of the controller to create without the .cfc. For packages, specify name as 'myPackage/myController'
    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 controller hint description
    open boolean false false Open the controller once generated

    Command Usage

    Create a new controller (handler) 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 controller will be created in /handlers but you can override that with the directory param.

    coldbox create controller myController index,foo,bar --open