Skip to content

Commit

Permalink
Merge pull request theodo#66 from marekkalnik/master
Browse files Browse the repository at this point in the history
Update documentation
  • Loading branch information
marekkalnik committed Dec 4, 2012
2 parents 9f35558 + db4a969 commit 68abaca
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 107 deletions.
71 changes: 10 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,25 @@
Theodo RogerCMSBundle
=====================


WARNING: This bundle is still under developpement and is not considered stable.

WARNING: This bundle is still under developpement.
While it is functional, the service names, configuration options etc. may change
without worrying about BC breaks.

## Installation

### Step 1: Adding the bundle to your project

### Step 1: Downloading the bundle
To add the bundle to your project add the following entry to your deps file:

``` bash
[RogerCmsBundle]
git=https://github.com/theodo/TheodoRogerCmsBundle.git
target=/bundles/Theodo/RogerCmsBundle
```


### Step 2: Dependencies

**Using Composer**

Add the Roger repository:
Add the Roger repository to your composer.json file:

``` json
"require": {
"theodo/roger-cms-bundle": "dev-master"
}
```

Then run ```php composer.phar install``` and you are done. You can now jump to the step 4.

**Using the vendors script**

Add the following lines to your `deps` file:

``` bash
[DoctrineExtensionsBundle]
git=https://github.com/stof/StofDoctrineExtensionsBundle.git
version=origin/master
target=/bundles/Stof/DoctrineExtensionsBundle

[DoctrineExtensions]
git=http://github.com/l3pp4rd/DoctrineExtensions.git
version=origin/master
target=/gedmo-doctrine-extensions
```

**Notice:**
TheodoRogerCms depends on Twig and it's not usable without it.
Due to some bugs in previous versions of Twig, v 1.2.0 or higher is required.

### Step 3: autoload.php

You need to register the `Theodo` namespace before using the bundle. Add the following line to your `app/autoload.php` file: `'Theodo' => __DIR__.'/../vendor/bundles',`.
As TheodoRogerCms depends on the DoctrineExtensionsBundle and the DoctrineExtensions library you also need to register them in the autoload.

``` php
use Symfony\Component\ClassLoader\UniversalClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;

$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
'Symfony' => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
'Stof' => __DIR__.'/../vendor/bundles',
'Gedmo' => __DIR__.'/../vendor/gedmo-doctrine-extensions/lib',
'Theodo' => __DIR__.'/../vendor/bundles',
));
```
Then run ```php composer.phar update theodo/reger-cms-bundle``` and you are done.

### Step 4: AppKernel.php
### Step 2: AppKernel.php

Register TheodoRogerCmsBundle in your `app/AppKernel.php` file:

Expand All @@ -90,7 +39,7 @@ Register TheodoRogerCmsBundle in your `app/AppKernel.php` file:

Follow StofDoctrineExtensionsBundle's doc to add the configuration for **timestampable** behavior.

### Step 5: Routing
### Step 3: Routing

Add the following lines to your `app/config/routing.yml` file:

Expand All @@ -100,7 +49,7 @@ RogerCms:
prefix: /
```

### Step 6: Database and entities
### Step 4: Database and entities

RogerCMS uses database to store all content informations, so you need to add its
entities to your entity manager. As it also uses his own user management system
Expand All @@ -112,6 +61,6 @@ If you don't feel like having Roger in separate db, the Symfony Standard Edition
default config will work out of the box. Just generate your schema/migrations
and update your db.

### Step 7: Read the docs
### Step 5: Read the docs

For more documentation, check out the Resources/doc folder.
61 changes: 15 additions & 46 deletions Resources/doc/01-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,48 +17,7 @@ To add the bundle to your project add the following entry to your deps file:
target=/bundles/Theodo/RogerCmsBundle
```


### Step 2: Dependencies

**Using the vendors script**

Add the following lines to your `deps` file:

``` bash
[DoctrineExtensionsBundle]
git=https://github.com/stof/StofDoctrineExtensionsBundle.git
version=origin/master
target=/bundles/Stof/DoctrineExtensionsBundle

[DoctrineExtensions]
git=http://github.com/l3pp4rd/DoctrineExtensions.git
version=origin/master
target=/gedmo-doctrine-extensions
```

**Notice:**
TheodoRogerCms depends on Twig and it's not usable without it.
Due to some bugs in previous versions of Twig, v 1.2.0 or higher is required.

### Step 3: autoload.php

You need to register the `Theodo` namespace before using the bundle. Add the following line to your `app/autoload.php` file: `'Theodo' => __DIR__.'/../vendor/bundles',`.
As TheodoRogerCms depends on the DoctrineExtensionsBundle and the DoctrineExtensions library you also need to register them in the autoload.

``` php
use Symfony\Component\ClassLoader\UniversalClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;

$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
'Symfony' => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
'Stof' => __DIR__.'/../vendor/bundles',
'Gedmo' => __DIR__.'/../vendor/gedmo-doctrine-extensions/lib',
'Theodo' => __DIR__.'/../vendor/bundles',
));
```

### Step 4: AppKernel.php
### Step 2: AppKernel.php

Register TheodoRogerCmsBundle in your `app/AppKernel.php` file:

Expand All @@ -74,11 +33,12 @@ Register TheodoRogerCmsBundle in your `app/AppKernel.php` file:
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new Theodo\RogerCmsBundle\TheodoRogerCmsBundle(),
);
}
```

Follow StofDoctrineExtensionsBundle's doc to add the configuration for **timestampable** behavior.

### Step 5: Routing
### Step 3: Routing

Add the following lines to your `app/config/routing.yml` file:

Expand Down Expand Up @@ -109,9 +69,7 @@ _roger_cms_frontend:
prefix: /cms
```



### Step 6: Database and entities
### Step 4: Database and entities

RogerCMS uses database to store all content informations, so you need to add its
entities to your entity manager. As it also uses his own user management system
Expand All @@ -122,3 +80,14 @@ how to setup and manage a separate database connection for the CMS, refer to
If you don't feel like having Roger in separate db, the Symfony Standard Edition
default config will work out of the box. Just generate your schema/migrations
and update your db.

### Step 5: Timestampable behaviour

You need to enable the timestampable behavoiur of stof_doctrine_extension

# app/config/config.yml
stof_doctrine_extensions:
default_locale: en_US
orm:
default:
timestampable: true

0 comments on commit 68abaca

Please sign in to comment.