Skip to content

Commit a3a8a37

Browse files
committed
Issue #110: update book tutorial
Signed-off-by: horea <horea@rospace.com>
1 parent 396ac51 commit a3a8a37

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

docs/book/v6/tutorials/create-book-module.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,13 @@ declare(strict_types=1);
203203
namespace Api\Book\Service;
204204

205205
use Core\Book\Entity\Book;
206+
use Core\Book\Repository\BookRepository;
206207
use Doctrine\ORM\QueryBuilder;
207208

208209
interface BookServiceInterface
209210
{
211+
public function getBookRepository(): BookRepository;
212+
210213
public function saveBook(array $data): Book;
211214

212215
public function getBooks(array $filters = []): QueryBuilder;
@@ -233,8 +236,14 @@ use Exception;
233236
class BookService implements BookServiceInterface
234237
{
235238
#[Inject(BookRepository::class)]
236-
public function __construct(protected BookRepository $bookRepository)
239+
public function __construct(
240+
protected BookRepository $bookRepository
241+
) {
242+
}
243+
244+
public function getBookRepository(): BookRepository
237245
{
246+
return $this->bookRepository;
238247
}
239248

240249
/**

0 commit comments

Comments
 (0)