From 8dc1844b869b40f52e76e080e37ecb19af3e03f7 Mon Sep 17 00:00:00 2001 From: Marcin Dryka Date: Thu, 8 Mar 2012 22:50:46 +0100 Subject: [PATCH] SyliusBloggerBundle update (Symfony 2.1 with Composer, SyliusBloggerBundle dev-master) --- bundles/SyliusBloggerBundle.rst | 76 +++++++++++++++++++++------------ 1 file changed, 49 insertions(+), 27 deletions(-) diff --git a/bundles/SyliusBloggerBundle.rst b/bundles/SyliusBloggerBundle.rst index a8ddc7e5b1..3f7e279637 100644 --- a/bundles/SyliusBloggerBundle.rst +++ b/bundles/SyliusBloggerBundle.rst @@ -22,20 +22,21 @@ This can be done in several ways, depending on your preference. The first method is the standard Symfony2 method. -Using the vendors script +Using the Composer ************************ -Add the following lines in your `deps` file. :: +Add the following lines in your `composer.json` file. :: - [SyliusBloggerBundle] - git=git://github.com/Sylius/SyliusBloggerBundle.git - target=bundles/Sylius/Bundle/BloggerBundle + "require": { + ... + "sylius/blogger-bundle": "dev-master" + } Now, run the vendors script to download the bundle. .. code-block:: bash - $ php bin/vendors install + $ php composer.phar update Using submodules **************** @@ -47,21 +48,6 @@ If you prefer instead to use git submodules, then run the following lines. $ git submodule add git://github.com/Sylius/SyliusBloggerBundle.git vendor/bundles/Sylius/Bundle/BloggerBundle $ git submodule update --init -Autoloader configuration -~~~~~~~~~~~~~~~~~~~~~~~~ - -Add the `Sylius\\Bundle` namespace to your autoloader. - -.. code-block:: php - - registerNamespaces(array( - 'Sylius\\Bundle' => __DIR__.'/../vendor/bundles' - )); - Adding bundle to kernel ~~~~~~~~~~~~~~~~~~~~~~~ @@ -84,9 +70,22 @@ Finally, enable the bundle in the kernel... Importing routing configuration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. note:: +.. code-block:: yaml - This part is not written yet. + sylius_blogger_category: + resource: @SyliusBloggerBundle/Resources/config/routing/frontend/post.yml + prefix: /administration/posts + + sylius_blogger_backend: + resource: @SyliusBloggerBundle/Resources/config/routing/backend/post.yml + prefix: /administration/blog/posts + +Or in XML format: + +.. code-block:: xml + + + Container configuration ~~~~~~~~~~~~~~~~~~~~~~~ @@ -109,16 +108,39 @@ For "**ORM**" driver run the following command. Usage guide ----------- -.. note:: +Create PostType class: - This part is not written yet. +.. code-block:: php + +