Skip to content
Snippets Groups Projects
Commit 7576d70a authored by Justin Toupin's avatar Justin Toupin
Browse files

format fix for README.md

parent 69ea3293
No related branches found
No related tags found
No related merge requests found
......@@ -70,9 +70,7 @@ Because a Layout is attached to a Paragraphs reference field, manipulating the l
#### Example Code: Working with a Layout
<code>
<?php
```php
// Instantiate a new layout given an exisitng node
// and the paragraph reference field name.
$layout = new LayoutParagraphsLayout($node, $field_name);
......@@ -84,9 +82,7 @@ $layout->insertAfterComponent($existing_paragraph_uuid, $the_new_paragraph);
// Call the save() method on the node to save the changes permanently.
$layout->getEntity()->save();
?>
</code>
```
#### Example Code: Rendering a Layout Paragraph
......@@ -94,11 +90,7 @@ Note that rendering a Layout Section is already handled in the Layout Paragraphs
See \Drupal\layout_paragraphs\Plugin\paragraphs\Behavior\LayoutParagraphsBehavior::view
<code>
<?php
```php
$layout_service = \Drupal::service('layout_paragraphs');
$layout_service->renderLayoutParagraph($paragraph_entity, $view_mode);
?>
</code>
\ No newline at end of file
```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment