This repository was archived by the owner on Sep 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +31
-4
lines changed Expand file tree Collapse file tree 5 files changed +31
-4
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,21 @@ And then access the CMF via:
128
128
129
129
http://localhost:8000
130
130
131
+
132
+ If you run an Apache installation as described in the `Symfony cookbook article on setup `_,
133
+ your URL will look like this:
134
+
135
+ .. code-block :: text
136
+
137
+ http://localhost/app_dev.php
138
+
139
+ .. note ::
140
+
141
+ Adding the ``app_dev.php `` to the url in your browser is important to actually
142
+ see the test page. Because the AcmeDemoBundle is only configured to work with the
143
+ Development Environment. (If you have a look at ``AppKernel.php `` you can easily
144
+ spot why)
145
+
131
146
.. sidebar :: Using Other Database Backends
132
147
133
148
If you prefer to use another database backend, for example MySQL, run the
@@ -254,3 +269,4 @@ and then run the following command:
254
269
.. _`guidelines in the symfony book` : http://symfony.com/doc/master/book/installation.html#configuration-and-setup
255
270
.. _`the Symfony2 book` : http://symfony.com/doc/current/book/
256
271
.. _`Fixtures` : http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html
272
+ .. _`Symfony cookbook article on setup` : http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html
Original file line number Diff line number Diff line change @@ -49,8 +49,10 @@ To create a page, use the
49
49
// // src/Acme/MainBundle/DataFixtures/PHPCR/LoadSimpleCms.php
50
50
namespace Acme\DemoBundle\DataFixtures\PHPCR;
51
51
52
- use Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page;
52
+ use Doctrine\Common\DataFixtures\FixtureInterface;
53
+ use Doctrine\Common\Persistence\ObjectManager;
53
54
use Doctrine\ODM\PHPCR\DocumentManager;
55
+ use Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page;
54
56
55
57
class LoadSimpleCms implements FixtureInterface
56
58
{
@@ -97,8 +99,10 @@ structure, you would do::
97
99
// // src/Acme/MainBundle/DataFixtures/PHPCR/LoadSimpleCms.php
98
100
namespace Acme\DemoBundle\DataFixtures\PHPCR;
99
101
100
- use Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page;
102
+ use Doctrine\Common\DataFixtures\FixtureInterface;
103
+ use Doctrine\Common\Persistence\ObjectManager;
101
104
use Doctrine\ODM\PHPCR\DocumentManager;
105
+ use Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page;
102
106
103
107
class LoadSimpleCms implements FixtureInterface
104
108
{
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ other examples:
47
47
/about # /about Route
48
48
/contact # /contact Route
49
49
/team # /contact/team Route
50
- /docs # /docs Route
50
+ /docs # /contact/ docs Route
51
51
52
52
OK, you got it? The only thing the Router has to do is prefix the route with a
53
53
specific path prefix and load that document. In the case of the SimpleCmsBundle,
Original file line number Diff line number Diff line change @@ -404,6 +404,8 @@ the page action::
404
404
// src/Acme/BasicCmsBundle/Controller/DefaultController.php
405
405
406
406
// ...
407
+ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
408
+
407
409
class DefaultController extends Controller
408
410
{
409
411
// ...
Original file line number Diff line number Diff line change @@ -108,8 +108,13 @@ first level of child items. Modify your fixtures to declare a root element
108
108
to which you will add the existing ``Home `` page and an additional ``About `` page::
109
109
110
110
// src/Acme/BasicCmsBundle/DataFixtures/Phpcr/LoadPageData.php
111
+ namespace Acme\DemoBundle\DataFixtures\PHPCR;
112
+
113
+ use Doctrine\Common\DataFixtures\FixtureInterface;
114
+ use Doctrine\Common\Persistence\ObjectManager;
115
+ use Doctrine\ODM\PHPCR\DocumentManager;
116
+ use Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page;
111
117
112
- // ...
113
118
class LoadPageData implements FixtureInterface
114
119
{
115
120
public function load(ObjectManager $dm)
You can’t perform that action at this time.
0 commit comments