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

Commit 7fbfeba

Browse files
author
Roel Sint
committed
Block - move mappings to xml
1 parent 8222bbb commit 7fbfeba

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

bundles/block/cache.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ CmfBlockBundle and the SonataBlockBundle:
8585
cache: cmf.block.cache.js_async
8686
blocks_by_class:
8787
# cache only the RssBlock and not all action blocks
88-
Symfony\Cmf\Bundle\BlockBundle\Document\RssBlock:
88+
Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\RssBlock:
8989
cache: cmf.block.cache.js_async
9090
9191
.. code-block:: xml

bundles/block/create_your_own_blocks.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Create a block document
1919
-----------------------
2020

2121
The first thing you need is an document that contains the data. It is
22-
recommended to extend ``Symfony\Cmf\Bundle\BlockBundle\Document\BaseBlock``
22+
recommended to extend ``Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\AbstractBlock``
2323
contained in this bundle (however you are not forced to do so, as long as you
2424
implement ``Sonata\BlockBundle\Model\BlockInterface``). In your document, you
2525
need to define the ``getType`` method which just returns ``acme_main.block.rss``.
@@ -30,14 +30,14 @@ need to define the ``getType`` method which just returns ``acme_main.block.rss``
3030
namespace Acme\MainBundle\Document;
3131
3232
use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM;
33-
use Symfony\Cmf\Bundle\BlockBundle\Document\BaseBlock;
33+
use Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\AbstractBlock;
3434
3535
/**
3636
* Rss Block
3737
*
3838
* @PHPCRODM\Document(referenceable=true)
3939
*/
40-
class RssBlock extends BaseBlock
40+
class RssBlock extends AbstractBlock
4141
{
4242
public function getType()
4343
{

bundles/block/introduction.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ specific settings for one of the block classes.
8989
settings:
9090
maxItems: 3
9191
blocks_by_class:
92-
Symfony\Cmf\Bundle\BlockBundle\Document\RssBlock:
92+
Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\RssBlock:
9393
settings:
9494
maxItems: 3
9595
@@ -170,7 +170,7 @@ Block Document
170170
Before you can render a block, you need to create a data object representing
171171
your block in the repository. You can do so with the following code snippet::
172172

173-
use Symfony\Cmf\Bundle\BlockBundle\Document\SimpleBlock;
173+
use Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock;
174174

175175
// ...
176176

@@ -185,7 +185,7 @@ your block in the repository. You can do so with the following code snippet::
185185
Note the ``sidebarBlock`` is the identifier we chose for the block. Together
186186
with the parent document of the block, this makes the block unique. The other
187187
properties are specific to
188-
``Symfony\Cmf\Bundle\BlockBundle\Document\SimpleBlock``.
188+
``Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock``.
189189

190190
The simple block is now ready to be rendered, see
191191
:ref:`bundle-block-rendering`.
@@ -194,7 +194,7 @@ The simple block is now ready to be rendered, see
194194

195195
Always make sure you implement the interface
196196
``Sonata\BlockBundle\Model\BlockInterface`` or an existing block document
197-
like ``Symfony\Cmf\Bundle\BlockBundle\Document\BaseBlock``.
197+
like ``Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\AbstractBlock``.
198198

199199
Block Context
200200
-------------

bundles/block/types.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ display them in a list.
7878

7979
Create a document::
8080

81-
use Symfony\Cmf\Bundle\BlockBundle\Document\RssBlock;
81+
use Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\RssBlock;
8282

8383
// ...
8484

@@ -201,8 +201,8 @@ Creating a slideshow consists of creating the container ``SlideshowBlock`` and
201201
adding blocks to it. Those blocks can be anything, but an image makes a lot
202202
of sense::
203203

204-
use Symfony\Cmf\Bundle\BlockBundle\Document\SlideshowBlock;
205-
use Symfony\Cmf\Bundle\BlockBundle\Document\ImagineBlock;
204+
use Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SlideshowBlock;
205+
use Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ImagineBlock;
206206
// the Image will be moved to Symfony\Cmf\Bundle\MediaBundle\Model\Image
207207
use Doctrine\ODM\PHPCR\Document\Image;
208208
use Doctrine\ODM\PHPCR\Document\File;

bundles/tree_browser.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,11 @@ This configuration is set for all your application trees regardless their type
157157
- all
158158
Symfony\Cmf\Bundle\ContentBundle\Document\MultilangStaticContent:
159159
valid_children:
160-
- Symfony\Cmf\Bundle\BlockBundle\Document\SimpleBlock
161-
- Symfony\Cmf\Bundle\BlockBundle\Document\ContainerBlock
162-
- Symfony\Cmf\Bundle\BlockBundle\Document\ReferenceBlock
163-
- Symfony\Cmf\Bundle\BlockBundle\Document\ActionBlock
164-
Symfony\Cmf\Bundle\BlockBundle\Document\ReferenceBlock:
160+
- Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock
161+
- Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ContainerBlock
162+
- Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ReferenceBlock
163+
- Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ActionBlock
164+
Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ReferenceBlock:
165165
valid_children: []
166166
# ...
167167

tutorials/using_blockbundle_and_contentbundle.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ your ``DataFixtures/PHPCR`` directory::
259259
use Doctrine\ODM\PHPCR\Document\Generic;
260260
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
261261
use Symfony\Component\DependencyInjection\ContainerInterface;
262-
use Symfony\Cmf\Bundle\BlockBundle\Document\SimpleBlock;
262+
use Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock;
263263

264264
class LoadBlockWithPhpcrParent extends AbstractFixture implements ContainerAwareInterface
265265
{
@@ -370,7 +370,7 @@ sample block, so create the ``LoadBlockWithCmfParent.php`` class::
370370
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
371371
use Symfony\Component\DependencyInjection\ContainerInterface;
372372
use PHPCR\Util\NodeHelper;
373-
use Symfony\Cmf\Bundle\BlockBundle\Document\SimpleBlock;
373+
use Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock;
374374
use Symfony\Cmf\Bundle\ContentBundle\Document\StaticContent;
375375

376376
class LoadBlockWithCmfParent extends AbstractFixture implements ContainerAwareInterface
@@ -662,7 +662,7 @@ SimpleBlock class not found
662662
.. code-block:: text
663663
664664
[Doctrine\Common\Persistence\Mapping\MappingException]
665-
The class 'Symfony\Cmf\Bundle\BlockBundle\Document\SimpleBlock' was not found in the chain configured namespaces Doctrine\ODM\PHPCR\Document, Sonata\UserBundle\Document, FOS\UserBundle\Document
665+
The class 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock' was not found in the chain configured namespaces Doctrine\ODM\PHPCR\Document, Sonata\UserBundle\Document, FOS\UserBundle\Document
666666
667667
Make sure the CMF BlockBundle is installed and loaded in ``app/AppKernel.php``::
668668

0 commit comments

Comments
 (0)