From 953555bdad641fd9be914f62db54620f7cee150b Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Mon, 14 Aug 2017 15:35:10 +0200 Subject: [PATCH 1/2] fix a typo --- bundles/block/introduction.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/block/introduction.rst b/bundles/block/introduction.rst index ba9fdca6..9a3dabd7 100644 --- a/bundles/block/introduction.rst +++ b/bundles/block/introduction.rst @@ -297,7 +297,7 @@ Embedding Blocks in WYSIWYG Content The CmfBlockBundle provides a Twig filter ``cmf_embed_blocks`` that scans through a content and looks for special tags to render blocks. To use the tag, you need to apply the ``cmf_embed_blocks`` filter to your output. This -feature is a rather hacky solution for web editors to place blocks anywhere in +feature is a hack to allow web editors to place blocks anywhere in their HTML content. If you can, render your blocks directly in the template. A better solution would be to build composed pages is to build it from blocks. From 5d809249f84eef03ef3210f881be1c5a3af2d305 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Mon, 14 Aug 2017 15:45:47 +0200 Subject: [PATCH 2/2] make labels consistent --- book/routing.rst | 4 ++-- bundles/block/cache.rst | 8 +++---- bundles/block/configuration.rst | 4 ++-- bundles/block/create_your_own_blocks.rst | 8 +++---- bundles/block/introduction.rst | 20 ++++++++-------- bundles/block/types.rst | 2 +- bundles/core/publish_workflow.rst | 10 ++++---- bundles/core/templating.rst | 30 ++++++++++++------------ bundles/create/introduction.rst | 6 ++--- bundles/create/other-editors.rst | 4 ++-- bundles/phpcr_odm/configuration.rst | 2 +- bundles/phpcr_odm/introduction.rst | 2 +- bundles/phpcr_odm/multiple_sessions.rst | 2 +- bundles/routing/dynamic.rst | 20 ++++++++-------- bundles/routing/dynamic_customize.rst | 6 ++--- bundles/simple_cms/rendering.rst | 2 +- 16 files changed, 65 insertions(+), 65 deletions(-) diff --git a/book/routing.rst b/book/routing.rst index 1a6c1b5d..bdb2df39 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -519,8 +519,8 @@ handle ``StaticContent`` as :ref:`explained above `. -You can also find :ref:`route entity documentation and Doctrine ORM integration `. +:ref:`route document section in the RoutingBundle documentation `. +You can also find :ref:`route entity documentation and Doctrine ORM integration `. Further Notes ------------- diff --git a/bundles/block/cache.rst b/bundles/block/cache.rst index dc8c06b4..ec2a4e35 100644 --- a/bundles/block/cache.rst +++ b/bundles/block/cache.rst @@ -15,7 +15,7 @@ The CmfBlockBundle additionally provides its own adapters for: .. note:: It is advised to store all settings in the block document when using cache. - See also :ref:`bundle-block-cache-rendering`. + See also :ref:`bundles-block-cache-rendering`. Dependencies ------------ @@ -164,7 +164,7 @@ If the cache is checked and the cache adapter returned that no cache was found, the workflow proceeds like this: * The block service is asked to render the block - :ref:`as usual `; + :ref:`as usual `; * If the ``Response`` is cacheable, the configured adapter creates a cache element containing: @@ -178,7 +178,7 @@ the workflow proceeds like this: Cache Keys ---------- -It is the responsibility of the :ref:`block service ` to generate the cache keys in +It is the responsibility of the :ref:`block service ` to generate the cache keys in the method ``getCacheKeys``. The block services shipped with the Symfony CMF BlockBunde use the @@ -219,7 +219,7 @@ The BlockBundle also has a cache invalidation listener that calls the ``flush`` method of a cache adapter automatically when a cached block document is updated or removed. -.. _bundle-block-cache-rendering: +.. _bundles-block-cache-rendering: Block Rendering --------------- diff --git a/bundles/block/configuration.rst b/bundles/block/configuration.rst index a76a7141..321f9664 100644 --- a/bundles/block/configuration.rst +++ b/bundles/block/configuration.rst @@ -7,7 +7,7 @@ application configuration. When using XML, you can use the The BlockBundle *automatically* changes some defaults and adds configuration to the SonataBlockBundle to make the integration work seamlessly. See the -:ref:`updated SonataBlockBundle defaults ` +:ref:`updated SonataBlockBundle defaults ` for more information. Configuration @@ -96,7 +96,7 @@ the value of ``%cmf_core.persistence.phpcr.basepath%/content``. The BlockBundle provides a Twig filter ``cmf_embed_blocks`` that looks through the content and looks for special tags to render blocks. -See :ref:`embed blocks in content ` for using the +See :ref:`embed blocks in content ` for using the ``cmf_embed_blocks`` filter. ``prefix`` diff --git a/bundles/block/create_your_own_blocks.rst b/bundles/block/create_your_own_blocks.rst index ec88989e..03439a72 100644 --- a/bundles/block/create_your_own_blocks.rst +++ b/bundles/block/create_your_own_blocks.rst @@ -6,8 +6,8 @@ Follow these steps to create a block: * define a block document class; * if needed, create a block service and declare it (optional); * instantiate a data object representing your block in the repository, see - :ref:`bundle-block-document`; -* render the block, see :ref:`bundle-block-rendering`; + :ref:`bundles-block-document`; +* render the block, see :ref:`bundles-block-rendering`; Lets say you are working on a project where you have to integrate data received from several RSS feeds. You could create an ActionBlock for each of @@ -193,7 +193,7 @@ that knows how to fetch the feed data of an ``RssBlock``:: } } -.. _bundle-block-execute: +.. _bundles-block-execute: The Execute Method ~~~~~~~~~~~~~~~~~~ @@ -223,7 +223,7 @@ places afterwards, cascading as follows: * Default settings from the block service; * If you use a 3rd party bundle you might want to change them in the bundle - configuration for your application see :ref:`bundle-block-configuration`; + configuration for your application see :ref:`bundles-block-configuration`; * Settings can be altered through template helpers (see example below); * And settings can also be altered in a block document. Do this only for settings that are individual to the specific block instance rather than diff --git a/bundles/block/introduction.rst b/bundles/block/introduction.rst index 9a3dabd7..860ed6db 100644 --- a/bundles/block/introduction.rst +++ b/bundles/block/introduction.rst @@ -41,7 +41,7 @@ sonata bundles in addition to the CmfBlockBundle:: // ... } -.. _bundle-block-configuration: +.. _bundles-block-configuration: Usage ----- @@ -151,7 +151,7 @@ specific settings for one of the block classes. :ref:`Block Sonata Admin Extension ` that adds editing of the ``BaseBlock`` general block options. -.. _bundle-block-updated-sonata-defaults: +.. _bundles-block-updated-sonata-defaults: Updated SonataBlockBundle Defaults ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -165,7 +165,7 @@ updated: a ``div`` and slugifies the PHPCR path as id; The base template is kept compatible with the Sonata base template for non-cmf blocks; * **RssBlock configuration** adds the - :ref:`default RssBlock settings `. + :ref:`default RssBlock settings `. .. note:: @@ -173,7 +173,7 @@ updated: still change the values by setting the configuration values in your application configuration file. -.. _bundle-block-document: +.. _bundles-block-document: Block Document -------------- @@ -201,7 +201,7 @@ the block. The other properties (title and body) are specific to the ``Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock``. The simple block is now ready to be rendered, see -:ref:`bundle-block-rendering`. +:ref:`bundles-block-rendering`. .. note:: @@ -217,7 +217,7 @@ render the block. It aggregates and merges all settings from configuration, the block service, the block document and settings passed to the Twig template helper. Therefore, use the BlockContext to get or alter a setting if needed. -.. _bundle-block-service: +.. _bundles-block-service: Block Service ------------- @@ -230,7 +230,7 @@ When using the provided blocks, you do not need to worry about the block service. It is only relevant when :doc:`creating your own blocks `. -.. _bundle-block-rendering: +.. _bundles-block-rendering: Block rendering --------------- @@ -239,7 +239,7 @@ Rendering is handled by the SonataBlockBundle ``sonata_block_render`` Twig function. The block name is either an absolute PHPCR path or the name of the block relative to the ``cmfMainContent`` document. -To render the example from the :ref:`bundle-block-document` section, just add +To render the example from the :ref:`bundles-block-document` section, just add the following code to your Twig template: .. configuration-block:: @@ -271,7 +271,7 @@ block as follows: )) ?> This will make the BlockBundle render the specified block if the main content -(as per the :ref:`routing `) maps a field named +(as per the :ref:`routing `) maps a field named ``sidebarBlock``. If different main contents are rendered using different templates, make sure all that should support this block actually include the snippet above. @@ -289,7 +289,7 @@ receives the block object (equivalent to a Request object) and a ``Response`` object. The purpose of the ``execute`` method to set the content of the response object - typically by rendering a Twig template. -.. _bundle-block-embed: +.. _bundles-block-embed: Embedding Blocks in WYSIWYG Content ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/bundles/block/types.rst b/bundles/block/types.rst index 3feeea67..fe0f9f74 100644 --- a/bundles/block/types.rst +++ b/bundles/block/types.rst @@ -129,7 +129,7 @@ Create a document:: $documentManager->persist($myRssBlock); -.. _bundle-block-rss-settings: +.. _bundles-block-rss-settings: The available settings are: diff --git a/bundles/core/publish_workflow.rst b/bundles/core/publish_workflow.rst index fc83d677..c160f0a6 100644 --- a/bundles/core/publish_workflow.rst +++ b/bundles/core/publish_workflow.rst @@ -111,7 +111,7 @@ to view unpublished content as well:: // ... } -.. _bundle-core-publish-workflow-twig_function: +.. _bundles-core-publish-workflow-twig_function: To check publication in a template, use the Twig function ``cmf_is_published``, in PHP templating the ``$view['cmf']->isPublished`` method: @@ -156,7 +156,7 @@ in PHP templating the ``$view['cmf']->isPublished`` method: CMF. Those helpers already use the publish workflow where applicable. Code that loads content should do the publish checks. Thanks to a -:ref:`request listener `, routes and +:ref:`request listener `, routes and the main content provided by the :doc:`DynamicRouter <../routing/dynamic>` are checked automatically already. @@ -264,7 +264,7 @@ As voting is unanimous, each voter returns ``ACCESS_GRANTED`` if its criteria is met, but if a single voter returns ``ACCESS_DENIED``, the content is considered not published. -You can also implement your :ref:`own voters ` +You can also implement your :ref:`own voters ` for additional publication behavior. PublishableVoter @@ -287,7 +287,7 @@ and end date. A date may be null to indicate "always started" resp. * **getPublishEndDate**: If non-null, the date from which the document should stop being published. -.. _bundle-core-workflow-custom-voters: +.. _bundles-core-workflow-custom-voters: Custom Voters ............. @@ -346,7 +346,7 @@ should not call it to avoid triggering an exception. If a voter only gives access if the current user fulfills some requirement, it simply has to return ``ACCESS_DENIED`` if there is no current user. -.. _bundle-core-workflow-request_listener: +.. _bundles-core-workflow-request_listener: Publication Request Listener ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/bundles/core/templating.rst b/bundles/core/templating.rst index fe4819c7..71fef1cd 100644 --- a/bundles/core/templating.rst +++ b/bundles/core/templating.rst @@ -96,21 +96,21 @@ Walking the PHPCR tree Helper methods .............. -+---------------------------+---------------------+------------------------+--------------------------------------------------------------------------+ -| ``cmf_document_locales`` | ``getLocalesFor`` | ``$document``, | Get the locales of the provided document. If ``$includeFallbacks`` is | -| | | ``$includeFallbacks``, | ``true``, all fallback locales are provided as well, even if no | -| | | ``false`` | translation in that language exists. | -+---------------------------+---------------------+------------------------+--------------------------------------------------------------------------+ -| ``cmf_is_linkable`` | ``isLinkable`` | ``$document`` | Check if the provided object can be used to generate a URL. If this | -| | | | check returns true, it should be save to pass it to ``path`` or ``url``. | -| | | | An object is considered linkable if it either *is* an instance of | -| | | | ``Route`` or implements the ``RouteReferrersReadInterface`` *and* | -| | | | actually returns a route. | -+---------------------------+---------------------+------------------------+--------------------------------------------------------------------------+ -| ``cmf_is_published`` | ``isPublished`` | ``$document`` | Check with the publish workflow if the provided object is published. See | -| | | | also :ref:`cmf_is_published `| -| | | | for an example. | -+---------------------------+---------------------+------------------------+--------------------------------------------------------------------------+ ++---------------------------+---------------------+------------------------+---------------------------------------------------------------------------+ +| ``cmf_document_locales`` | ``getLocalesFor`` | ``$document``, | Get the locales of the provided document. If ``$includeFallbacks`` is | +| | | ``$includeFallbacks``, | ``true``, all fallback locales are provided as well, even if no | +| | | ``false`` | translation in that language exists. | ++---------------------------+---------------------+------------------------+---------------------------------------------------------------------------+ +| ``cmf_is_linkable`` | ``isLinkable`` | ``$document`` | Check if the provided object can be used to generate a URL. If this | +| | | | check returns true, it should be save to pass it to ``path`` or ``url``. | +| | | | An object is considered linkable if it either *is* an instance of | +| | | | ``Route`` or implements the ``RouteReferrersReadInterface`` *and* | +| | | | actually returns a route. | ++---------------------------+---------------------+------------------------+---------------------------------------------------------------------------+ +| ``cmf_is_published`` | ``isPublished`` | ``$document`` | Check with the publish workflow if the provided object is published. See | +| | | | also :ref:`cmf_is_published `| +| | | | for an example. | ++---------------------------+---------------------+------------------------+---------------------------------------------------------------------------+ Code examples ............. diff --git a/bundles/create/introduction.rst b/bundles/create/introduction.rst index b9e74206..0da756f9 100644 --- a/bundles/create/introduction.rst +++ b/bundles/create/introduction.rst @@ -82,7 +82,7 @@ bundles in your kernel and properly configure Assetic as described below. To upload and display images the :doc:`MediaBundle <../media/introduction>` is used. CKEditor uses the :doc:`elfinder adapter <../media/adapters/elfinder>`. -.. _bundle-create-ckeditor: +.. _bundles-create-ckeditor: Installation ------------ @@ -390,9 +390,9 @@ higher, the method reads: use the hallo editor, a plugin is enabled to use the tag editor to edit ``skos:related`` collections of attributes. For customization of the editor configuration further, you will need to use a - :ref:`custom template to load the editor`. + :ref:`custom template to load the editor`. -.. _bundle-create-usage-embed: +.. _bundles-create-usage-embed: Rendering Content ----------------- diff --git a/bundles/create/other-editors.rst b/bundles/create/other-editors.rst index 1d0257d0..c0826548 100644 --- a/bundles/create/other-editors.rst +++ b/bundles/create/other-editors.rst @@ -7,7 +7,7 @@ Other Editors .. include:: ../_partials/unmaintained.rst.inc -.. _bundle-create-hallo: +.. _bundles-create-hallo: Using Hallo.js Editor --------------------- @@ -78,7 +78,7 @@ the additional image controller routing file in your main routing configuration: return $collection; -.. _bundle-create-custom: +.. _bundles-create-custom: Custom Editors -------------- diff --git a/bundles/phpcr_odm/configuration.rst b/bundles/phpcr_odm/configuration.rst index 8c6b32c8..ac958679 100644 --- a/bundles/phpcr_odm/configuration.rst +++ b/bundles/phpcr_odm/configuration.rst @@ -95,7 +95,7 @@ Defines the PHPCR workspace to use for this PHPCR session. Every PHPCR implementation should provide the workspace called *default*, but you can choose a different one. There is the ``doctrine:phpcr:workspace:create`` command to initialize a new workspace. - See also :ref:`bundle-phpcr-odm-commands`. + See also :ref:`bundles-phpcr-odm-commands`. ``username and password`` """"""""""""""""""""""""" diff --git a/bundles/phpcr_odm/introduction.rst b/bundles/phpcr_odm/introduction.rst index 80df996e..d652be95 100644 --- a/bundles/phpcr_odm/introduction.rst +++ b/bundles/phpcr_odm/introduction.rst @@ -410,7 +410,7 @@ There are 3 main services provided by this bundle: * ``doctrine_phpcr.odm.default_document_manager`` - The PHPCR-ODM document manager instance. -.. _bundle-phpcr-odm-commands: +.. _bundles-phpcr-odm-commands: Doctrine PHPCR Commands ----------------------- diff --git a/bundles/phpcr_odm/multiple_sessions.rst b/bundles/phpcr_odm/multiple_sessions.rst index abce07ed..532995ce 100644 --- a/bundles/phpcr_odm/multiple_sessions.rst +++ b/bundles/phpcr_odm/multiple_sessions.rst @@ -9,7 +9,7 @@ of the ``session`` information. Each session has a name and the configuration following the same schema as what is directly in ``session``. You can also overwrite which session to use as ``default_session``. -.. _bundle-phpcr-odm-multiple-phpcr-sessions: +.. _bundles-phpcr-odm-multiple-phpcr-sessions: Multiple PHPCR Sessions ----------------------- diff --git a/bundles/routing/dynamic.rst b/bundles/routing/dynamic.rst index d6aca52f..1695a8e8 100644 --- a/bundles/routing/dynamic.rst +++ b/bundles/routing/dynamic.rst @@ -6,11 +6,11 @@ Dynamic Router This implementation of a router is configured to load routes from a ``RouteProviderInterface``. This interface can be easily implemented with -Doctrine for example. See the :ref:`following section ` +Doctrine for example. See the :ref:`following section ` for more details about the default `PHPCR-ODM`_ provider and -:ref:`further below ` for the Doctrine ORM +:ref:`further below ` for the Doctrine ORM based implementation. If those do not match your needs, you can -:ref:`build your own route provider `. +:ref:`build your own route provider `. You can configure the route enhancers that decide what controller is used to handle the request, to avoid hard coding controller names into your route @@ -88,7 +88,7 @@ When there is no configuration or ``cmf_routing.dynamic.enabled`` is set to ``false``, the dynamic router services will not be loaded at all, allowing you to use the ``ChainRouter`` with your own routers. -.. _bundle-routing-dynamic-match: +.. _bundles-routing-dynamic-match: Match Process ------------- @@ -195,10 +195,10 @@ controllers default to the ``ContentController`` provided by that bundle. .. tip:: You can also define your own ``RouteEnhancer`` classes for specific use - cases. See :ref:`bundle-routing-customize`. Use the priority to insert your + cases. See :ref:`bundles-routing-customize`. Use the priority to insert your enhancers in the correct order. -.. _bundle-routing-document: +.. _bundles-routing-document: Doctrine PHPCR-ODM Integration ------------------------------ @@ -289,7 +289,7 @@ a parameter, make them part of the variable pattern:: .. note:: The ``RouteDefaultsValidator`` validates the route defaults parameters. - For more information, see :ref:`bundle-routing-route-defaults-validator`. + For more information, see :ref:`bundles-routing-route-defaults-validator`. With the above example, your controller can expect both the ``$id`` parameter as well as the ``$contentDocument`` if you set a content on the route and have @@ -322,7 +322,7 @@ omit setting a content document on the route document. create one route per language for the same content. The route generator will pick the correct route if available. -.. _bundle-routing-entity: +.. _bundles-routing-entity: Doctrine ORM integration ------------------------ @@ -336,7 +336,7 @@ the name indicates, loads ``Route`` entities from an ORM database. You must install the CoreBundle to use this feature if your application does not have at least DoctrineBundle 1.3.0. -.. _bundle-routing-route-entity: +.. _bundles-routing-route-entity: The ORM Route entity -------------------- @@ -479,7 +479,7 @@ controller should handle ``Post`` entities as explained in the The ORM routes support more things, for example route parameters, requirements and defaults. This is explained in the -:ref:`route document section `. +:ref:`route document section `. .. _bundles-routing-dynamic-generator: diff --git a/bundles/routing/dynamic_customize.rst b/bundles/routing/dynamic_customize.rst index c485ce64..c1b33204 100644 --- a/bundles/routing/dynamic_customize.rst +++ b/bundles/routing/dynamic_customize.rst @@ -1,4 +1,4 @@ -.. _bundle-routing-customize: +.. _bundles-routing-customize: Customizing the Dynamic Router ============================== @@ -89,7 +89,7 @@ is executed. .. index:: Route Provider -.. _bundle-routing-custom_provider: +.. _bundles-routing-custom_provider: Using a Custom Route Provider ----------------------------- @@ -251,7 +251,7 @@ yourself and configure that service: ], ]); -.. _bundle-routing-route-defaults-validator: +.. _bundles-routing-route-defaults-validator: The RouteDefaultsValidator ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/bundles/simple_cms/rendering.rst b/bundles/simple_cms/rendering.rst index 8a7d93e1..cd515416 100644 --- a/bundles/simple_cms/rendering.rst +++ b/bundles/simple_cms/rendering.rst @@ -57,4 +57,4 @@ front-end. The most simple form is the following Twig block: {% endblock %} If you want to control more detailed what should be shown with RDFa, see -chapter :ref:`bundle-create-usage-embed`. +chapter :ref:`bundles-create-usage-embed`.