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

Commit b84fb86

Browse files
author
Roel Sint
committed
Block - move setContent to setBody
1 parent 7fbfeba commit b84fb86

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

bundles/block/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ your block in the repository. You can do so with the following code snippet::
178178
$myBlock->setParentDocument($parentDocument);
179179
$myBlock->setName('sidebarBlock');
180180
$myBlock->setTitle('My first block');
181-
$myBlock->setContent('Hello block world!');
181+
$myBlock->setBody('Hello block world!');
182182

183183
$documentManager->persist($myBlock);
184184

bundles/block/types.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ StringBlock
1010
-----------
1111

1212
This is a very simple block that just provides one string field called
13-
``content`` and the default template renders the content as ``raw`` to
13+
``body`` and the default template renders the content as ``raw`` to
1414
allow HTML in the field. The template outputs no HTML tags around the string
1515
at all.
1616

1717
SimpleBlock
1818
-----------
1919

20-
Just a text block with a ``title`` and a ``content``. The default template
20+
Just a text block with a ``title`` and a ``body``. The default template
2121
renders both title and content as ``raw``, meaning HTML is allowed in those
2222
fields.
2323

tutorials/using_blockbundle_and_contentbundle.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ like this::
230230
$myBlock->setParentDocument($parentPage);
231231
$myBlock->setName('sidebarBlock');
232232
$myBlock->setTitle('My first block');
233-
$myBlock->setContent('Hello block world!');
233+
$myBlock->setBody('Hello block world!');
234234

235235
$documentManager->persist($myBlock);
236236

@@ -279,7 +279,7 @@ your ``DataFixtures/PHPCR`` directory::
279279
$myBlock->setParentDocument($document);
280280
$myBlock->setName('testBlock');
281281
$myBlock->setTitle('CMF BlockBundle only');
282-
$myBlock->setContent('Block from CMF BlockBundle, parent from the PHPCR (Generic document).');
282+
$myBlock->setBody('Block from CMF BlockBundle, parent from the PHPCR (Generic document).');
283283
$manager->persist($myBlock);
284284

285285
// Commit $document and $block to the database
@@ -394,7 +394,7 @@ sample block, so create the ``LoadBlockWithCmfParent.php`` class::
394394
$myBlock->setParentDocument($document);
395395
$myBlock->setName('testBlock');
396396
$myBlock->setTitle('CMF BlockBundle and ContentBundle');
397-
$myBlock->setContent('Block from CMF BlockBundle, parent from CMF ContentBundle (StaticContent).');
397+
$myBlock->setBody('Block from CMF BlockBundle, parent from CMF ContentBundle (StaticContent).');
398398
$manager->persist($myBlock);
399399

400400
// Commit $document and $block to the database

0 commit comments

Comments
 (0)