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

Commit 8bd2d1e

Browse files
committed
Merge pull request #46 from greg0ire/obvious_mistakes_fixes
Obvious mistakes fixes
2 parents ceb7d46 + 14ff3ae commit 8bd2d1e

7 files changed

+30
-30
lines changed

bundles/block.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ BlockBundle
22
===========
33

44
The `BlockBundle <https://github.com/symfony-cmf/BlockBundle#readme>`_ provides integration with SonataBlockBundle.
5-
It assists you in managing fragments of contents, so called blocks. What the BlockBundle does is similar
6-
to what Twig does, but for blocks that are persisted in a DB. Thus the blocks can be made editable for an editor.
5+
It assists you in managing fragments of contents, so-called blocks. What the BlockBundle does is similar
6+
to what Twig does, but for blocks that are persisted in a DB. Thus, the blocks can be made editable for an editor.
77
Also the BlockBundle provides the logic to determine which block should be rendered on which pages.
88

99
The BlockBundle does not provide an editing functionality for blocks itself. However, you can find examples
@@ -64,7 +64,7 @@ The BlockBundle comes with four general purpose blocks:
6464
* SimpleBlock: A simple block with nothing but a title and a field of hypertext. This would usually be what an editor edits directly, for example contact information
6565
* ContainerBlock: A block that contains 0 to n child blocks
6666
* ReferenceBlock: A block that references a block stored somewhere else in the content tree. For example you might want to refer parts of the contact information from the homepage
67-
* ActionBlock: A block that calls a Symfony2 action. "Why would I use this instead of directly calling the action from my template?" you might wonder. Well imagine the following case: You provide a block that renders teasers of your latest news. However, there is no rule where they should appear. Instead, your customer wants to decide himself on what pages this block is to be displayed. Providing an according ActionBlock, you allow your customer to do so without calling you to change some templates (over and over again!).
67+
* ActionBlock: A block that calls a Symfony2 action. "Why would I use this instead of directly calling the action from my template?", you might wonder. Well imagine the following case: You provide a block that renders teasers of your latest news. However, there is no rule where they should appear. Instead, your customer wants to decide himself on what pages this block is to be displayed. Providing an according ActionBlock, you allow your customer to do so without calling you to change some templates (over and over again!).
6868

6969
Create your own blocks
7070
----------------------
@@ -86,7 +86,7 @@ template stored in 'templateName'. You can again extend ``Sonata\BlockBundle\Blo
8686
It is important, that the 'name' property of the service is called 'my_bundle.block.rss' (this makes
8787
sure the relation between entity and service can be found).
8888

89-
The last thing you need is to define the service in a config file. It is important, to tag your
89+
The last thing you need is to define the service in a config file. It is important to tag your
9090
BlockService with 'sonata.block', otherwise it will not be known by the Bundle.
9191

9292
Examples
@@ -105,4 +105,4 @@ It replaces components of the bundle where needed to be compatible with PHPCR.
105105
The following picture shows where we use our own components (blue):
106106

107107
.. image:: ../images/bundles/classdiagram.jpg
108-
:align: center
108+
:align: center

bundles/core.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ One of the provided features is an interface and implementation of a publish wor
99
with an accompanying interface that models can implement that want to support this checker.
1010

1111
Furthermore it provides a twig helper exposing several useful functions for twig templates
12-
to interact with PHPCR-ODM documents
12+
to interact with PHPCR-ODM documents.
1313

1414
.. index:: CoreBundle, PHPCR, ODM, publish workflow
1515

@@ -49,7 +49,7 @@ Implements the following functions:
4949
* ``cmf_prev``: returns the previous published document by examining the child nodes of the parent of the provided
5050
* ``cmf_next``: returns the next published document by examining the child nodes of the parent of the provided
5151
* ``cmf_children``: returns an array of all the children documents of the provided documents that are published
52-
* ``cmf_document_locales``: get the locales of the provided document
52+
* ``cmf_document_locales``: gets the locales of the provided document
5353

5454
.. code-block:: jinja
5555

tutorials/choosing-a-storage-layer.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ the necessary extension points to ensure the **CMF remains storage layer agnosti
99
The goal of this tutorial is to explain the considerations and why we suggest
1010
`PHPCR <http://phpcr.github.com>`_ and `PHPCR-ODM <http://www.doctrine-project.org/projects/phpcr-odm.html>`_
1111
as the ideal basis for a CMS. However all components and Bundles can be
12-
integrate with other solutions with a fairly small amount of work.
12+
integrated with other solutions with a fairly small amount of work.
1313

1414
.. index:: PHPCR, ODM, ORM
1515

@@ -20,7 +20,7 @@ At the most fundamental level a CMS is about storing, so the first requirement
2020
is that *a CMS must provide means to store content with different properties*.
2121

2222
A CMS has very different storage needs than for example a system for processing orders.
23-
Do note however that its entirely possible and very intended of the CMF initiative
23+
Do note however that it is entirely possible and very intended of the CMF initiative
2424
to enable developers to combine the CMF with a system for processing orders. So
2525
for example one could create a shopping solution using the CMF for storing the product
2626
catalog, while using another system for maintaining the inventory, customer data
@@ -30,7 +30,7 @@ both content stored inside the CMS, but also in other systems.
3030
The actual content in a CMS tends to be organized in a tree like structure, mimicking
3131
a file system. Note that content authors might want to use different structures for how
3232
to organize the content and how to organize other aspects like the menu and the routing.
33-
This leads to the third requirement, *a CMS must provide means be represent the content as a tree structure*.
33+
This leads to the third requirement, *a CMS must provide means to represent the content as a tree structure*.
3434
Furthermore a fourth requirement is that *a CMS should allow maintaining several independent tree structures*.
3535

3636
In general data inside a CMS tends to be unstructured. So while several pages inside
@@ -43,9 +43,9 @@ meaning. So *a CMS must provide means to optionally define a schema for content
4343

4444
This requirement actually also relates to another need, in that a CMS must make it easy
4545
for content authors to prepare a series of changes in a staging environment that then
46-
need to go online in a single step. This means another requirement is that its necessary
47-
that the *a CMS should support moving and exporting content between independent tree structures*.
48-
Note that exporting can be useful also for backup.
46+
needs to go online in a single step. This means another requirement is that it is necessary
47+
that *a CMS should support moving and exporting content between independent tree structures*.
48+
Note that exporting can be useful also for backups.
4949

5050
When making changes it would however also be useful to be able to version the change sets,
5151
so that they remain available for historical purposes, but also to be able to revert whenever
@@ -99,7 +99,7 @@ you might prioritize features differently:
9999
RDBMS
100100
~~~~~
101101

102-
Looking at the above requirements it becomes apparent that ouf the box an RDBMS is
102+
Looking at the above requirements it becomes apparent that out the box an RDBMS is
103103
ill-suited to address the needs of a CMS. RDBMS were never intended to store
104104
tree structures of unstructured content. Really the only requirement RDBMS cover from
105105
the above list is the ability to store content, some way to reference content,
@@ -109,7 +109,7 @@ This is not a failing of RDBMS in the sense that they were simply designed for a
109109
use case: the ability to store, manipulate and aggregate structured data. This makes them
110110
ideal for storing inventory and orders.
111111

112-
That is not to say that its impossible to build a system on top of an RDBMS that address
112+
That is not to say that it is impossible to build a system on top of an RDBMS that addresses
113113
more or even all of the above topics. Some RDBMS natively support recursive queries, which
114114
can be useful for retrieving tree structures. Even if such native support is missing, there
115115
are algorithms like materialized path and nested sets that can enable efficient storage
@@ -118,7 +118,7 @@ and retrieval of tree structures for different use cases.
118118
The point is however that these all require algorithms and code on top of an RDBMS which
119119
also tightly bind your business logic to a particular RDBMS and/or algorithm even if some
120120
of them can be abstracted. So again using an ORM one could create a pluggable system for
121-
mangaging tree structures with different algorithms which prevent binding the business logic
121+
managing tree structures with different algorithms which prevent binding the business logic
122122
of the CMS to a particular algorithm.
123123

124124
However it should be said once more, that all Bundles and Components in the CMF are developed
@@ -131,14 +131,14 @@ PHPCR
131131
~~~~~
132132

133133
PHPCR essentially is a set of interfaces addressing most of the requirements from the above list.
134-
This means that PHPCR is totally storage agnostic in the sense that its possible to really
134+
This means that PHPCR is totally storage agnostic in the sense that it is possible to really
135135
put any persistence solution behind PHPCR. So in the same way as an ORM can support different
136136
tree storage algorithms via some plugin, PHPCR aims to provide an API for the entire breath of
137137
CMS needs, therefore cleanly separating the entire business logic of your CMS from the persistence
138138
choice. As a matter of fact the only feature above not natively supported by PHPCR is support
139139
for translations.
140140

141-
Thanks to the availability of several PHPCR implementations supporting various kinda of persistence
141+
Thanks to the availability of several PHPCR implementations supporting various kinds of persistence
142142
choices, creating a CMS on top of PHPCR means that end users are enabled to pick and choose
143143
what works best for them, their available resources, their expertise and their scalability requirements.
144144

@@ -148,19 +148,19 @@ RDBMS shipped with PHP itself. At the other end of the spectrum Jackalope also s
148148
`Jackrabbit <http://jackrabbit.apache.org>`_ which supports clustering and can efficiently
149149
handle data into the hundreds of gigabytes. By default Jackrabbit simply uses the file system for
150150
persistence, but it can also use an RDBMS. However future versions will support MongoDB and support for
151-
other NoSQL solutions like CouchDB or Cassandra are entirely possible. Again switching the persistence
151+
other NoSQL solutions like CouchDB or Cassandra is entirely possible. Again, switching the persistence
152152
solution would require no code changes as the business logic is only bound to the PHPCR interfaces.
153153

154-
Please see :doc:`installing-configuring-doctrine-phpcr-odm` for more details on the all available
155-
PHPCR implementations and their requirements and how to setup the Symfony2 with one of them.
154+
Please see :doc:`installing-configuring-doctrine-phpcr-odm` for more details on the available
155+
PHPCR implementations and their requirements and how to setup Symfony2 with one of them.
156156

157157
PHPCR ODM
158158
~~~~~~~~~
159159

160-
As mentioned above using PHPCR does not mean giving up on RDBMS. In many ways PHPCR can be considered
160+
As mentioned above using PHPCR does not mean giving up on RDBMS. In many ways, PHPCR can be considered
161161
a specialized ORM solution for CMS. However while PHPCR works with so called *nodes*, in an ORM
162162
people expect to be able to map class instances to a persistence layer. This is exactly what PHPCR ODM
163163
provides. It follows the same interface classes as Doctrine ORM while also exposing all the additional
164-
capabilities of PHPCR, like trees and versioning. Furthermore it also provides native support for
164+
capabilities of PHPCR, like trees and versioning. Furthermore, it also provides native support for
165165
translations, covering the only omission of PHPCR for the above mentioned requirements list of a CMS
166166
storage solution.

tutorials/installing-configuring-cmf.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ can be found in the dedicated documentation.
8080
Configuration
8181
-------------
8282

83-
To get your application running very little configuration is needed.
83+
To get your application running, very little configuration is needed.
8484

8585
Minimum configuration
8686
~~~~~~~~~~~~~~~~~~~~~
@@ -90,7 +90,7 @@ These steps are needed to ensure your AppKernel still runs.
9090
If you haven't done so already, make sure you have followed these steps from
9191
:doc:`installing-configuring-doctrine-phpcr-odm`:
9292

93-
- Initialise ``DoctrinePHPCRBundle`` in ``app/AppKernel.php``
93+
- Initialize ``DoctrinePHPCRBundle`` in ``app/AppKernel.php``
9494
- Ensure there is a ``doctrine_phpcr:`` section in ``app/config/config.yml``
9595
- Add the ``AnnotationRegistry::registerFile`` line to ``app/autoload.php``
9696

tutorials/installing-configuring-doctrine-phpcr-odm.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ an API that is optimized for the needs of a CMS (tree structures, references, ve
3535
text search etc.). While every content repository can have very different requirements and
3636
performance characteristics, the API is the same for all of them.
3737

38-
Furthermore since the API defines an export/import format, you can always switch to a different
38+
Furthermore, since the API defines an export/import format, you can always switch to a different
3939
content repository implementation later on.
4040

4141
These are the available choices:

tutorials/installing-configuring-inline-editing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Configuration
6262
-------------
6363
Next step is to configure the bundles.
6464

65-
Basic configuration, add to your application configuration
65+
Basic configuration, add to your application configuration:
6666

6767
.. configuration-block::
6868

@@ -85,4 +85,4 @@ The filename is the full class name including namespace with the backslashes ``\
8585
Reference
8686
---------
8787

88-
See :doc:`../bundles/create`
88+
See :doc:`../bundles/create`

tutorials/installing-configuring-simple-cms.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Installing and configuring a simple CMS setup
22
=============================================
33

4-
The goal of this tutorial is to install and configure simple CMS.
4+
The goal of this tutorial is to install and configure a simple CMS.
55
Note that Symfony2.1 is required for the CMF to work.
66

77
The SimpleCmsBundle provides a solution to easily map content, routes and menu
@@ -76,4 +76,4 @@ Next step is to configure the bundles.
7676
templates_by_class:
7777
Symfony\Cmf\Bundle\SimpleCmsBundle\Document\Page: SymfonyCmfSimpleCmsBundle:Page:index.html.twig
7878
79-
For the full reference, see :doc:`../bundles/simple-cms`.
79+
For the full reference, see :doc:`../bundles/simple-cms`.

0 commit comments

Comments
 (0)