Skip to content

Commit

Permalink
Tweaked new cookbook article
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed Jan 18, 2014
1 parent 18cbacd commit 034d69a
Showing 1 changed file with 7 additions and 24 deletions.
31 changes: 7 additions & 24 deletions cookbook/doctrine/console.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ Console Commands
----------------

The Doctrine2 ORM integration offers several console commands under the
``doctrine`` namespace. To view the command list you can run the console
without any arguments:
``doctrine`` namespace. To view the command list you can use the ``list``
command:

.. code-block:: bash
$ php app/console
$ php app/console list doctrine
A list of available commands will print out, many of which start with the
``doctrine:`` prefix. You can find out more information about any of these
commands (or any Symfony command) by running the ``help`` command. For example,
to get details about the ``doctrine:database:create`` task, run:
A list of available commands will print out. You can find out more information
about any of these commands (or any Symfony command) by running the ``help``
command. For example, to get details about the ``doctrine:database:create``
task, run:

.. code-block:: bash
Expand All @@ -41,20 +41,3 @@ Some notable or interesting tasks include:

* ``doctrine:query:dql`` and ``doctrine:query:sql`` - allow you to execute
DQL or SQL queries directly from the command line.

.. note::

To be able to load data fixtures to your database, you will need to have
the DoctrineFixturesBundle bundle installed. To learn how to do it,
read the ":doc:`/bundles/DoctrineFixturesBundle/index`" entry of the
documentation.

.. tip::

This page shows working with Doctrine within a controller. You may also
want to work with Doctrine elsewhere in your application. The
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::getDoctrine`
method of the controller returns the ``doctrine`` service, you can work with
this in the same way elsewhere by injecting this into your own
services. See :doc:`/book/service_container` for more on creating
your own services.

0 comments on commit 034d69a

Please # to comment.