You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/book/v6/tutorials/create-book-module.md
+70-51Lines changed: 70 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,8 @@ The below files structure is what we will have at the end of this tutorial and i
15
15
│ │ └── Book.php
16
16
│ ├── Handler/
17
17
│ │ ├── GetBookCollectionHandler.php
18
-
│ │ ├── GetBookHandler.php
19
-
│ │ └── PostBookHandler.php
18
+
│ │ ├── GetBookResourceHandler.php
19
+
│ │ └── PostBookResourceHandler.php
20
20
│ ├── InputFilter/
21
21
│ │ ├── Input/
22
22
│ │ │ ├── AuthorInput.php
@@ -40,17 +40,19 @@ The below files structure is what we will have at the end of this tutorial and i
40
40
41
41
```
42
42
43
-
*`src/Book/src/Collection/BookCollection.php` - a collection refers to a container for a group of related objects, typically used to manage sets of related entities fetched from a database
44
-
*`src/Core/src/Book/src/Entity/Book.php` - an entity refers to a PHP class that represents a persistent object or data structure
45
-
*`src/Book/src/Handler/GetBookCollectionHandler.php` - handler that reflects the GET action for the BookCollection class
46
-
*`src/Book/src/Handler/GetBookHandler.php` - handler that reflects the GET action for the Book entity
47
-
*`src/Book/src/Handler/PostBookHandler.php` - handler that reflects the POST action for the Book entity
48
-
*`src/Core/src/Book/src/Repository/BookRepository.php` - a repository is a class responsible for querying and retrieving entities from the database
49
-
*`src/Book/src/Service/BookService.php` - is a class or component responsible for performing a specific task or providing functionality to other parts of the application
50
-
*`src/Book/src/ConfigProvider.php` - is a class that provides configuration for various aspects of the framework or application
51
-
*`src/Book/src/RoutesDelegator.php` - a routes delegator is a delegator factory responsible for configuring routing middleware based on routing configuration provided by the application
52
-
*`src/Book/src/InputFilter/CreateBookInputFilter.php` - input filters and validators
53
-
*`src/Book/src/InputFilter/Input/*` - input filters and validator configurations
43
+
*`src/Book/src/Collection/BookCollection.php` – a collection refers to a container for a group of related objects, typically used to manage sets of related entities fetched from a database
44
+
*`src/Book/src/ConfigProvider.php` – is a class that provides configuration for various aspects of the framework or application
45
+
*`src/Book/src/Handler/GetBookCollectionHandler.php` – handler that reflects the GET action for the BookCollection class
46
+
*`src/Book/src/Handler/GetBookResourceHandler.php` – handler that reflects the GET action for the Book entity
47
+
*`src/Book/src/Handler/PostBookResourceHandler.php` – handler that reflects the POST action for the Book entity
48
+
*`src/Book/src/InputFilter/CreateBookInputFilter.php` – input filters and validators
49
+
*`src/Book/src/InputFilter/Input/*` – input filters and validator configurations
50
+
*`src/Book/src/RoutesDelegator.php` – a routes delegator is a delegator factory responsible for configuring routing middleware based on routing configuration provided by the application
51
+
*`src/Book/src/Service/BookService.php` – is a class or component responsible for performing a specific task or providing functionality to other parts of the application
52
+
*`src/Core/src/Book/src/ConfigProvider.php` – is a class that provides configuration for Doctrine ORM
53
+
*`src/Core/src/Book/src/Entity/Book.php` – an entity refers to a PHP class that represents a persistent object or data structure
54
+
*`src/Core/src/Book/src/Repository/BookRepository.php` – a repository is a class responsible for querying and retrieving entities from the database
@@ -593,7 +589,7 @@ class CreateBookInputFilter extends AbstractInputFilter
593
589
}
594
590
```
595
591
596
-
We split all the inputs just for the purpose of this tutorial and to demonstrate a clean `BookInputFiler` but you could have all the inputs created directly in the `CreateBookInputFilter` like this:
592
+
We split all the inputs just for the purpose of this tutorial and to demonstrate a clean `CreateBookInputFilter` but you could have all the inputs created directly in the `CreateBookInputFilter` like this:
We need to configure access to the newly created endpoints, add `books::list-books`, `book::view-book` and `book::create-book` to the authorization rbac array, under the `UserRole::ROLE_GUEST` key.
776
-
> Make sure you read and understand the rbac documentation.
795
+
> Make sure you read and understand the rbac [documentation](https://docs.dotkernel.org/dot-rbac-guard/v4/configuration/).
0 commit comments