Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 44f233d

Browse files
committed
Fixed README
1 parent 451f533 commit 44f233d

File tree

1 file changed

+31
-56
lines changed

1 file changed

+31
-56
lines changed

README.md

Lines changed: 31 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,52 @@
1-
# [WIP] Symfony CMF Routing Auto Route Bundle [![Build Status](https://secure.travis-ci.org/symfony-cmf/RoutingAutoBundle.png)](http://travis-ci.org/symfony-cmf/RoutingExtraBundle)
1+
# [WIP] Symfony CMF Routing Auto Route Bundle [![Build Status](https://secure.travis-ci.org/symfony-cmf/RoutingAutoBundle.png)](http://travis-ci.org/symfony-cmf/RoutingAutoBundle)
22

3-
This bundle is a WIP to automatically creates and manages routes for configured persisted
3+
This bundle is a WIP which automatically creates and manages routes for configured persisted
44
document classes.
55

6+
See the [official documentation](http://symfony.com/doc/master/cmf/bundles/routing-auto.html)
7+
68
## Example configuration
79

810
The following is the current functional test configuration:
911

10-
symfony_cmf_routing_auto_route:
12+
symfony_cmf_routing_auto:
1113

12-
auto_route_definitions:
14+
auto_route_mapping:
1315

1416
##
1517
# e.g. /cms/auto-route/blog/my-blogs-title
1618
Symfony\Cmf\Bundle\RoutingAutoBundle\Tests\Functional\app\Document\Blog:
17-
chain:
18-
base:
19-
path_provider:
20-
name: specified
21-
path: /cms/auto-route/blog
22-
exists_action:
23-
strategy: use
24-
not_exists_action:
25-
strategy: create
26-
blog_title:
27-
path_provider:
28-
name: from_object_method
29-
method: getTitle
30-
exists_action:
31-
strategy: auto_increment
32-
not_exists_action:
33-
strategy: create
3419

35-
##
36-
# e.g. /cms/auto-route/blog/my-blogs-title/2013-04-09/my-post-title
37-
Symfony\Cmf\Bundle\RoutingAutoBundle\Tests\Functional\app\Document\Post:
38-
chain:
39-
40-
# /cms/auto-route/blog/my-blogs-title
41-
blog_path:
42-
path_provider:
20+
# generate or use path components leading up to the final part of the path
21+
content_path:
22+
base:
23+
provider:
4324
name: specified
44-
from_method: getBlogRoutePath
45-
exists_action:
25+
path: /test/auto-route/blog
26+
exists_action:
4627
strategy: use
47-
not_exists_action:
48-
strategy: throw_exception
49-
50-
# 2013-04-09
51-
date:
52-
path_provider:
53-
name: date
54-
format: yyyy-mm-dd
55-
from_method: getPublishedAt
56-
exists_action:
57-
strategy: use
58-
not_exists_action:
59-
strategy: create
60-
61-
# my-post-title
62-
post_title:
63-
path_provider:
64-
name: slugify_object_method
65-
from_method: getTitle
66-
slugfier: symfony_cmf_routing_auto_route.default_slugifier
67-
exists_action:
68-
strategy: auto_increment
69-
pattern: -%d
70-
not_exists_action:
28+
not_exists_action:
7129
strategy: create
72-
30+
patcher: generic
31+
32+
content_name:
33+
provider:
34+
name: from_object_method
35+
method: getTitle
36+
exists_action:
37+
strategy: auto_increment
38+
pattern: -%d
39+
not_exists_action:
40+
strategy: create
7341

7442
## Restrictions:
7543

7644
* Only documents stored with PHPCR-ODM are supported.
7745
* You must have the RoutingExtraBundle installed.
46+
47+
## Installation
48+
49+
Add a requirement for ``symfony-cmf/routing-auto-bundle`` to your
50+
composer.json and instantiate the bundle in your AppKernel.php
51+
52+
new Symfony\Cmf\Bundle\RoutingAutoBundle\SymfonyCmfRoutingAutoBundle()

0 commit comments

Comments
 (0)