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/content_management/collaborative_editing/extend_collaborative_editing.md
+36-36Lines changed: 36 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,19 +71,19 @@ When creating the Database Gateways and mappers, you can use the build-in servic
71
71
72
72
In the `Collaboration/Cart/Persistence/Gateway` directory create the following files:
73
73
74
-
- `DatabaseGateway` - implements the gateway logic for getting and retrieving shared Cart collaboration data from the database, using a Discriminator to indicate the type of session (in this case, a Cart session):
74
+
- `DatabaseSchema` - defines and creates the database tables needed to store shared Cart collaboration session data:
- `DatabaseSchema` - defines and creates the database tables needed to store shared Cart collaboration session data:
80
+
- `DatabaseGateway` - implements the gateway logic for getting and retrieving shared Cart collaboration data from the database, using a Discriminator to indicate the type of session (in this case, a Cart session):
Value objects describe how collaboration session data is represented in the database.
89
89
Persistence gateway uses them to store, retrieve, and manipulate session information, such as the session ID, associated Cart, participants, and scopes.
@@ -93,19 +93,19 @@ In the `Collaboration/Cart/Persistence/Values` directory create the following Va
93
93
- `CartSession` - represents the Cart collaboration session data:
To start collaborating, you need to work on permissions.
145
-
This involves decorating the `PermissionResolver` and `CartResolver`.
146
-
147
-
This step makes sure that if a Cart is part of a Cart collaboration session, users can access it due to the given permission, and in all other cases, it falls back to the default implementation.
148
-
149
-
!!! caution "Decorating permissions"
150
-
151
-
Be careful when decorating permissions to change the behavior only as necessary, ensuring the Cart is shared only with the intended users.
152
-
153
-
In the `src/Collaboration/Cart` directory, create the following files:
154
-
155
-
- `PermissionResolverDecorator`– customizes the permission resolver to handle access rules for Cart collaboration sessions, allowing participants to view or edit shared Carts while preserving default permission checks for all other cases. Here you can decide what scope is available for this collaboration session by choosing between `view` or `edit`.
- `CartResolverDecorator`– extends the permission resolver to allow access to shared Carts in collaboration sessions, it checks if a Cart belongs to a collaboration session.
To start collaborating, you need to work on permissions.
175
+
This involves decorating the `PermissionResolver` and `CartResolver`.
176
+
177
+
This step makes sure that if a Cart is part of a Cart collaboration session, users can access it due to the given permission, and in all other cases, it falls back to the default implementation.
178
+
179
+
!!! caution "Decorating permissions"
180
+
181
+
Be careful when decorating permissions to change the behavior only as necessary, ensuring the Cart is shared only with the intended users.
182
+
183
+
In the `src/Collaboration/Cart` directory, create the following files:
184
+
185
+
- `PermissionResolverDecorator`– customizes the permission resolver to handle access rules for Cart collaboration sessions, allowing participants to view or edit shared Carts while preserving default permission checks for all other cases. Here you can decide what scope is available for this collaboration session by choosing between `view` or `edit`.
- `CartResolverDecorator`– extends the permission resolver to allow access to shared Carts in collaboration sessions, it checks if a Cart belongs to a collaboration session.
## Build dedicated controllers to manage the Cart sharing flow
198
198
199
199
To support Cart sharing, you need to create controllers which handle the collaboration flow.
@@ -232,8 +232,8 @@ Finally, `redirectToRoute` redirects the user to the Cart view and passes the id
232
232
!!! caution "Session parameter"
233
233
234
234
Avoid using a generic session parameter name such as `current_collaboration_session` (it's used here only for example purposes).
235
-
If multiple collaboration session types exist, for example, Content and Cart sessions, the parameter may be overwritten when another session is started.
236
-
Try to use more specific and unique parameter name to prevent conflicts between different session types.
235
+
The user can participate in multiple sessions simultaneously (of one or many types), so using this parameter would cause it to be constantly overwritten.
236
+
Therefore, active sessions should not be resolved based on such parameter.
237
237
238
238
## Integrate with Symfony forms by adding forms and templates
0 commit comments