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

[WIP] Replacing symfony_cmf with cmf_ #140

Merged
merged 2 commits into from
May 30, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions bundles/block/cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ Installation
------------

The installation is split between the SonataCacheBundle, the
SymfonyCmfBlockBundle and the SonataBlockBundle:
CmfBlockBundle and the SonataBlockBundle:

1. *SonataCacheBundle* - Follow the installation instructions from the
`SonataCacheBundle documentation`_.
2. *SymfonyCmfBlockBundle* - At the end of your routing file, add the
2. *CmfBlockBundle* - At the end of your routing file, add the
following lines:

.. configuration-block::
Expand All @@ -39,9 +39,9 @@ SymfonyCmfBlockBundle and the SonataBlockBundle:
# app/config/routing.yml

# ...
# routes SymfonyCmfBlockBundle cache adapters
# routes CmfBlockBundle cache adapters
block_cache:
resource: "@SymfonyCmfBlockBundle/Resources/config/routing/cache.xml"
resource: "@CmfBlockBundle/Resources/config/routing/cache.xml"
prefix: /

3. *SonataBlockBundle* - Use the ``sonata_block`` key to configure the cache
Expand All @@ -55,9 +55,9 @@ SymfonyCmfBlockBundle and the SonataBlockBundle:
sonata_block:
# ...
blocks:
symfony_cmf.block.action:
cmf.block.action:
# use the service id of the cache adapter
cache: symfony_cmf.block.cache.js_async
cache: cmf.block.cache.js_async

Workflow
--------
Expand Down Expand Up @@ -180,7 +180,7 @@ Configuration
.. code-block:: yaml

# app/config/config.yml
symfony_cmf_block:
cmf_block:
# ...
caches:
esi:
Expand All @@ -201,7 +201,7 @@ Configuration
.. code-block:: yaml

# app/config/config.yml
symfony_cmf_block:
cmf_block:
# ...
caches:
ssi:
Expand Down
6 changes: 3 additions & 3 deletions bundles/block/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ This bundle is based on the `SonataBlockBundle`_.
Configuration
-------------

The configuration key for this bundle is ``symfony_cmf_block``:
The configuration key for this bundle is ``cmf_block``:

.. configuration-block::

.. code-block:: yaml

# app/config/config.yml
symfony_cmf_block:
cmf_block:
document_manager_name: default

.. code-block:: xml
Expand All @@ -49,7 +49,7 @@ The configuration key for this bundle is ``symfony_cmf_block``:
.. code-block:: php

// app/config/config.php
$container->loadFromExtension('symfony_cmf_block', array(
$container->loadFromExtension('cmf_block', array(
'document_manager_name' => 'default',
));

Expand Down
16 changes: 8 additions & 8 deletions bundles/block/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ All available settings are:
* **maxItems**: the maximum amount of items to return to the template
(*default*: 10)
* **template**: the template to render the feed items (*default*:
``SymfonyCmfBlockBundle:Block:block_rss.html.twig``)
``CmfBlockBundle:Block:block_rss.html.twig``)
* **ItemClass**: the class used for the item objects that are passed to the
template (*default*: ``Symfony\Cmf\Bundle\BlockBundle\Model\FeedItem``)

The controller to get the feed items can also be changed:

* Define a different class for the controller service in your configuration
using the DI service parameter ``symfony_cmf_block.rss_controller_class``
using the DI service parameter ``cmf_block.rss_controller_class``
* or set the actionName of your RssBlock document

.. note::
Expand All @@ -51,7 +51,7 @@ out of PHPCR. The block has a child of type ``nt:file`` and fields for the
name of the imagine filter to use, an URL and an image caption. To use this
block, you need to add ``liip/imagine-bundle`` to your composer.json and
define the imagine filter you specify in the block. The default name is
``symfony_cmf_block``. The filter must use the ``phpcr`` driver:
``cmf_block``. The filter must use the ``phpcr`` driver:

.. configuration-block::

Expand All @@ -61,7 +61,7 @@ define the imagine filter you specify in the block. The default name is
liip_imagine:
# ...
filter_sets:
symfony_cmf_block:
cmf_block:
data_loader: phpcr
quality: 85
filters:
Expand All @@ -77,7 +77,7 @@ define the imagine filter you specify in the block. The default name is

<liip-imagine:config xmlns="http://example.org/dic/schema/liip_imagine">
<!-- ... -->
<filter-set name="symfony_cmf_block" data-loader="phpcr" quality="85">
<filter-set name="cmf_block" data-loader="phpcr" quality="85">
<filter name="thumbnail" size="616,419" mode="outbound"/>
</filter-set>
<!-- ... -->
Expand All @@ -90,7 +90,7 @@ define the imagine filter you specify in the block. The default name is
$container->loadFromExtension('liip_imagine', array(
// ...
'filter_sets' => array(
'symfony_cmf_block' => array(
'cmf_block' => array(
'data_loader' => 'phpcr',
'quality' => 85,
'filters' => array(
Expand Down Expand Up @@ -201,11 +201,11 @@ following line to your sonata admin configuration:
blocks:
label: Blocks
items:
- symfony_cmf_block.slideshow_admin
- cmf_block.slideshow_admin

However, you can also embed the slideshow administration directly into
other admin classes using the ``sonata_type_admin`` form type. The admin
service to use in that case is ``symfony_cmf_block.slideshow_admin``.
service to use in that case is ``cmf_block.slideshow_admin``.
Please refer to the `Sonata Admin documentation`_
for further information.

Expand Down
60 changes: 30 additions & 30 deletions bundles/blog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Notes on this document
Dependencies
------------

* :doc:`SymfonyCmfRoutingBundle <routing>` is used to manage the routing;
* :doc:`SymfonyCmfRoutingAutoBundle<routing_auto>` is used to manage automatically generate routes;
* :doc:`CmfRoutingBundle <routing>` is used to manage the routing;
* :doc:`CmfRoutingAutoBundle<routing_auto>` is used to manage automatically generate routes;
* :doc:`PHPCR-ODM<phpcr-odm>` is used to persist the bundles documents.

Configuration
Expand All @@ -41,7 +41,7 @@ Example:
.. code-block:: yaml

# app/config.yml
symfony_cmf_blog:
cmf_blog:
use_sonata_admin: auto
blog_basepath: /cms/blog
class:
Expand All @@ -53,22 +53,22 @@ Example:
.. code-block:: xml

<!-- app/config/config.xml -->
<symfony-cmf-blog:config
<cmf-blog:config
use-sonata-admin="auto"
blog-basepath="/cms/blog"
>
<symfony-cmf-blog:class
<cmf-blog:class
blog-admin="Symfony\Cmf\Bundle\BlogBundle\Admin\BlogAdmin"
post-admin="Symfony\Cmf\Bundle\BlogBundle\Admin\PostAdmin"
blog="Symfony\Cmf\Bundle\BlogBundle\Document\Blog"
post="Symfony\Cmf\Bundle\BlogBundle\Document\Post"
/>
</symfony-cmf-blog:config>
</cmf-blog:config>

.. code-block:: php

// app/config/config.php
$container->loadFromExtension('symfony_cmf_blog', array(
$container->loadFromExtension('cmf_blog', array(
'use_sonata_admin' => 'auto',
'blog_basepath' => '/cms/blog',
'class' => array(
Expand Down Expand Up @@ -98,7 +98,7 @@ Explanation:
Auto Routing
~~~~~~~~~~~~

The blog bundle uses the ``SymfonyCmfRoutingAuto`` bundle to generate a route
The blog bundle uses the ``CmfRoutingAuto`` bundle to generate a route
for each content. You will need an auto routing configuration for this to work.

You can include the default in the main configuration file as follows:
Expand All @@ -110,15 +110,15 @@ You can include the default in the main configuration file as follows:
# app/config/config.yml
imports:
# ...
- { resource: @SymfonyCmfBlogBundle/Resources/config/routing/autoroute_default.yml }
- { resource: @CmfBlogBundle/Resources/config/routing/autoroute_default.yml }
# ...

.. code-block:: xml

<!-- app/config/config.xml -->
<imports>
<!-- ... -->
<import resource="@SymfonyCmfBlogBundle/Resources/config/routing/autoroute_default" />
<import resource="@CmfBlogBundle/Resources/config/routing/autoroute_default" />
</imports>
<!-- ... -->

Expand All @@ -140,44 +140,44 @@ Content Routing
To enable the routing system to automatically forward requests to the blog
controller when a ``Blog`` or ``Post`` content is associated with a route,
add the following under the ``controllers_by_class`` section of
``symfony_cmf_routing_extra`` in the main configuration file:
``cmf_routing_extra`` in the main configuration file:

.. configuration-block::

.. code-block:: yaml

# app/config/config.yml
symfony_cmf_routing_extra:
cmf_routing_extra:
# ...
dynamic:
# ...
controllers_by_class:
# ...
Symfony\Cmf\Bundle\BlogBundle\Document\Blog: symfony_cmf_blog.blog_controller:listAction
Symfony\Cmf\Bundle\BlogBundle\Document\Post: symfony_cmf_blog.blog_controller:viewPostAction
Symfony\Cmf\Bundle\BlogBundle\Document\Blog: cmf_blog.blog_controller:listAction
Symfony\Cmf\Bundle\BlogBundle\Document\Post: cmf_blog.blog_controller:viewPostAction

.. code-block:: xml

<!-- app/config/config.xml -->
<symfony-cmf-blog:config>
<symfony-cmf-blog:dynamic>
<symfony-cmf-blog:controllers-by-class
<cmf-blog:config>
<cmf-blog:dynamic>
<cmf-blog:controllers-by-class
class="Symfony\CmfBundle\BlogBundle\Document\Post"
>
symfony_cmf_blog.blog_controller:listAction"
</symfony-cmf-blog:controllers-by-class>
</symfony-cmf-blog:dynamic>
</symfony-cmf-blog:config>
cmf_blog.blog_controller:listAction"
</cmf-blog:controllers-by-class>
</cmf-blog:dynamic>
</cmf-blog:config>

.. code-block:: php

// app/config/config.php
$container->loadFromExtension('symfony_cmf_routing_extra', array(
$container->loadFromExtension('cmf_routing_extra', array(
// ...
'dynamic' => array(
'controllers_by_class' => array(
'Symfony\Cmf\Bundle\BlogBundle\Document\Blog' => 'symfony_cmf_blog.blog_controller:listAction',
'Symfony\Cmf\Bundle\BlogBundle\Document\Post' => 'symfony_cmf_blog.blog_controller:viewPostAction',
'Symfony\Cmf\Bundle\BlogBundle\Document\Blog' => 'cmf_blog.blog_controller:listAction',
'Symfony\Cmf\Bundle\BlogBundle\Document\Post' => 'cmf_blog.blog_controller:viewPostAction',
),
),
));
Expand All @@ -202,8 +202,8 @@ blog system visible on your dashboard, add the following to the
blog:
label: blog
items:
- symfony_cmf_blog.admin
- symfony_cmf_post.admin
- cmf_blog.admin
- cmf_post.admin

.. code-block:: php

Expand All @@ -216,8 +216,8 @@ blog system visible on your dashboard, add the following to the
'blog' => array(
'label' => 'blog',
'items' => array(
'symfony_cmf_blog.admin',
'symfony_cmf_post.admin',
'cmf_blog.admin',
'cmf_post.admin',
),
),
),
Expand Down Expand Up @@ -271,15 +271,15 @@ to do this is to create the following file:

.. code-block:: jinja

{# /app/Resources/SymfonyCmfBlogBundle/views/default_layout.html.twig #}
{# /app/Resources/CmfBlogBundle/views/default_layout.html.twig #}

{% extends "MyApplicationBundle::my_layout.html.twig" %}

{% block content %}
{% endblock %}

The blog will now use ``MyApplicationBundle::my_layout.html.twig`` instead of
``SymfonyCmfBlogBundle::default_layout.html.twig``.
``CmfBlogBundle::default_layout.html.twig``.

See `Overriding Bundle Templates`_ in the Symfony documentation for more
information.
Expand Down
4 changes: 2 additions & 2 deletions bundles/content.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ For an introduction see the :doc:`../getting-started/content` article in the
Configuration
-------------

The configuration key for this bundle is ``symfony_cmf_content``:
The configuration key for this bundle is ``cmf_content``:

.. configuration-block::

.. code-block:: yaml

# app/config/config.yml
symfony_cmf_content:
cmf_content:
admin_class: ~
document_class: ~
default_template: ~
Expand Down
6 changes: 3 additions & 3 deletions bundles/core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Configuration
.. code-block:: yaml

# app/config/config.yml
symfony_cmf_core:
cmf_core:
document_manager: default
role: IS_AUTHENTICATED_ANONYMOUSLY # used by the publish workflow checker

Expand All @@ -31,13 +31,13 @@ Configuration
Publish workflow checker
------------------------

The Bundle provides a ``symfony_cmf_core.publish_workflow_checker`` service
The Bundle provides a ``cmf_core.publish_workflow_checker`` service
which implements ``PublishWorkflowCheckerInterface``. This interface defines a
single method ``checkIsPublished()``.

.. code-block:: php

$publishWorkflowChecker = $container->get('symfony_cmf_core.publish_workflow_checker');
$publishWorkflowChecker = $container->get('cmf_core.publish_workflow_checker');

// if to ignore the role when deciding if to consider the document as published
$ignoreRole = false;
Expand Down
Loading