%PDF- %PDF-
Direktori : /home/emtnaeewxm/www/vendor/sensio/generator-bundle/Resources/doc/commands/ |
Current File : /home/emtnaeewxm/www/vendor/sensio/generator-bundle/Resources/doc/commands/generate_command.rst |
Generating a New Command ======================== .. caution:: If your application is based on Symfony 2.x version, replace ``php bin/console`` with ``php app/console`` before executing any of the console commands included in this article. Usage ----- The ``generate:command`` command generates a new Command class for the given console command. By default the command is run in the interactive mode and asks questions to determine the bundle and the command name: .. code-block:: bash $ php bin/console generate:command The command can be run in a non interactive mode by using the ``--no-interaction`` and providing the needed arguments: .. code-block:: bash $ php bin/console generate:command --no-interaction AcmeBlogBundle blog:publish-posts Available Arguments ------------------- * ``bundle``: The name of the bundle where the command class is generated. * ``name``: The name of the command as you type it in the console.