Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[generate:form:*] Form generation defaults to extend from ConfigFormBase class #171

Closed
jmolivas opened this issue Jul 17, 2014 · 4 comments

Comments

@jmolivas
Copy link
Member

When generating form using command
generate:form
By default the generated Form Class extends ConfigFormBase

Solutions

  1. Add new question
  • Ask for interface (more developer friendly)
    Interface to implement ? 'FormBase', 'ConfigFormBase', 'ConfirmFormBase'
  • Ask for form type (more user friendly)
    Form type to generate ? 'Generic', 'Configuration', 'Confirmation'
  1. Split command

generate:form:generic or as is now generate:form
generate:form:config or generate:form:configuration
generate:form:confirm or generate:form:confirmation

@jmolivas jmolivas self-assigned this Jul 17, 2014
@antillas21
Copy link

Could you make generate:form an alias or default to generate:form:generic and let users know (developers, common folk) that a command is 3 items long, first is the generator, second is the namespace or object, and third is a modifier... if no modifier is provided, it will default to something (in the 3 items schema).

Just my two cents.

@jmolivas
Copy link
Member Author

jmolivas commented Aug 4, 2014

make sense 👍

This was referenced Aug 29, 2014
@jmolivas
Copy link
Member Author

generator:form command was renamed to generator:form:config and code was modified to allow new form command to extend from GeneratorFormCommand class.

@jmolivas jmolivas mentioned this issue Jan 9, 2015
@jmolivas jmolivas changed the title Form generation defaults to extend from ConfigFormBase class [generate:form:*] Form generation defaults to extend from ConfigFormBase class Feb 15, 2015
@jmolivas jmolivas added this to the Must-have milestone Jun 12, 2015
@jmolivas
Copy link
Member Author

The generate:form command was added few releases back, I am, considering this closed.

g3r4 pushed a commit to g3r4/drupal-console that referenced this issue Jul 19, 2017
* [console] Fix package.

* [init] Show proper labels for questions.
@jmolivas jmolivas modified the milestone: 1.0.0-stable Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants