Skip to content

Commit 6db31ff

Browse files
authored
docs: fix typo & use code blocks (#234)
2 parents feb3d71 + ec4eeed commit 6db31ff

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/resource/create_new_resource.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@ Next: When you're ready, create a migration with php bin/console make:migration
9999

100100
## Configure the BookRepository
101101

102-
The command also generated a Doctrine repository class: `App\Repository\BookRepository`.
102+
The command also generated a Doctrine repository class.
103103

104+
{% code title="App\Repository\BookRepository.php" lineNumbers="true" %}
104105
```php
105106
<?php
106107

@@ -123,14 +124,16 @@ class BookRepository extends ServiceEntityRepository
123124
// [...]
124125
}
125126
```
127+
{% endcode %}
126128

127-
The generated code is not compatible with Sylius Resource yet, so we need to make few changes.
129+
The generated code is not compatible with Sylius Resource yet, so we need to make a few changes.
128130

129131
* First, your repository should implement the `Sylius\Component\Resource\Repository\RepositoryInterface` interface
130132
* Then, add the `Sylius\Bundle\ResourceBundle\Doctrine\ORM\ResourceRepositoryTrait` trait
131133

132134
Your repository should look like this:
133135

136+
{% code title="App\Repository\BookRepository.php" lineNumbers="true" %}
134137
```php
135138
<?php
136139

@@ -160,3 +163,4 @@ class BookRepository extends ServiceEntityRepository implements RepositoryInterf
160163
}
161164
}
162165
```
166+
{% endcode %}

0 commit comments

Comments
 (0)