Skip to content

Commit 5d8bed9

Browse files
committed
[cookbook][console] Moving the cookbook and adding basic line breaks
1 parent 3e77528 commit 5d8bed9

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

book/console.rst renamed to cookbook/console.rst

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
Console Commands
2-
================
1+
How to Create Console/Command-Line Commands
2+
===========================================
33

4-
Symfony2 ships with a console component. The framework offers a simple convention that allows
5-
you to register your own console commands for any recurring task, cronjobs, imports or other batch-jobs.
4+
Symfony2 ships with a console component. The framework offers a simple convention
5+
that allows you to register your own console commands for any recurring task,
6+
cronjobs, imports or other batch-jobs.
67

7-
To make the console commands available automatically with Symfony2 you have to create a ``Command``
8-
directory inside your bundle and create a php file suffixed with ``Command.php`` for each
9-
task that you want to provide. If we want to to extend the HelloBundle to greet us from the commandline
10-
aswell we get this simple block of necessary code:
8+
To make the console commands available automatically with Symfony2 you have
9+
to create a ``Command`` directory inside your bundle and create a php file
10+
suffixed with ``Command.php`` for each task that you want to provide. If
11+
we want to to extend the HelloBundle to greet us from the command line as
12+
well we get this simple block of necessary code:
1113

1214
.. code-block: php
1315
@@ -56,8 +58,9 @@ Advanced Usage
5658
Using the Dependency Injection Container
5759
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5860

59-
Using the Symfony\Bundle\FrameworkBundle\Command\Command as base class we also have access to
60-
the dependency injection container. As an example we could easily extend our task to be translatable:
61+
Using the Symfony\Bundle\FrameworkBundle\Command\Command as base class we
62+
also have access to the dependency injection container. As an example we
63+
could easily extend our task to be translatable:
6164

6265
.. code-block: php
6366

cookbook/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Cookbook
3232
routing/scheme
3333
debugging
3434
assetic/yuicompressor
35+
console
3536
symfony1
3637

3738
.. include:: map.rst.inc

cookbook/map.rst.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@
2525
* :doc:`/cookbook/routing/scheme`
2626
* :doc:`/cookbook/debugging`
2727
* :doc:`/cookbook/assetic/yuicompressor`
28+
* :doc:`/cookbook/console`
2829
* :doc:`/cookbook/symfony1`

0 commit comments

Comments
 (0)