Skip to content

Commit 7bb609b

Browse files
committed
Minor (formatting) improvements
1 parent 57ac5d9 commit 7bb609b

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

docs/php/api/interactions.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# Interactions
22

3-
The interaction system enables users to perform context menu actions on specific `DatabaseObject` instances. These interactions are designed to be reusable and universally available, ensuring consistency across the application wherever database objects appear—whether in lists, detail views, or other components.
3+
The interaction system enables users to perform context menu actions on specific `DatabaseObject` instances.
4+
These interactions are designed to be reusable and universally available, ensuring consistency across the application wherever database objects appear – whether in lists, detail views, or other components.
45

5-
Interactions are registered centrally using a provider class dedicated to each object type. This architecture allows for modular extensibility, where plugins can contribute additional interactions by subscribing to specialized registration events. Once registered, these plugin-defined interactions are seamlessly integrated and become available across all relevant UI contexts.
6+
Interactions are registered centrally using a provider class dedicated to each object type.
7+
This architecture allows for modular extensibility, where plugins can contribute additional interactions by subscribing to specialized registration events.
8+
Once registered, these plugin-defined interactions are seamlessly integrated and become available across all relevant UI contexts.
69

710
This system provides a clean, scalable way to define and extend user actions without duplicating logic or UI elements.
811

@@ -47,11 +50,13 @@ Bulk interactions are the successor to the “Clipboard” feature and are appli
4750

4851
**Type:** `(object) => boolean`
4952

50-
Interactions allows the configuration of callback function that determines whether a specific interaction can be applied to the given object. This function is responsible for:
53+
Interactions allow the configuration of callback function that determines whether a specific interaction can be applied to the given object.
54+
This function is responsible for:
55+
5156
* Verifying that the user has the necessary permissions to perform the interaction.
52-
* Preventing invalid state transitions (e.g., attempting to set an item as default when it is already the default).
57+
* Preventing invalid state transitions, for example, attempting to set an item as default when it is already the default.
5358

54-
If omitted, the interaction is considered unconditionally available.
59+
If omitted, the interaction is considered to be unconditionally available.
5560

5661
Example:
5762

@@ -72,10 +77,10 @@ new RpcInteraction(
7277
| --------------------------------------------------- | ----------- |
7378
| `InteractionConfirmationType::None` | No confirmation |
7479
| `InteractionConfirmationType::SoftDelete` | Predetermined confirmation message asking for a soft-delete. |
75-
| `InteractionConfirmationType::SoftDeleteWithReason` | Predetermined confirmation message asking for a soft-delete with the optional option to enter a reason. |
80+
| `InteractionConfirmationType::SoftDeleteWithReason` | Predetermined confirmation message asking for a soft-delete with an optional field for the reason. |
7681
| `InteractionConfirmationType::Restore` | Predetermined confirmation message asking for a restore. |
77-
| `InteractionConfirmationType::Delete` | Predetermined confirmation message asking for a delete. |
78-
| `InteractionConfirmationType::Disable` | Predetermined confirmation message asking for a disable. |
82+
| `InteractionConfirmationType::Delete` | Predetermined confirmation message asking for the permanent deletion. |
83+
| `InteractionConfirmationType::Disable` | Predetermined confirmation message asking to disable the item. |
7984
| `InteractionConfirmationType::Custom` | Allows you to specify a custom confirmation message. |
8085

8186
Example:
@@ -149,7 +154,7 @@ new EditInteraction(ExampleEditForm::class)
149154

150155
### `FormBuilderDialogInteraction`
151156

152-
Opens a form builder dialog using the given controller link.
157+
Opens a form builder dialog using the given controller link that is expected to provide a `Psr15DialogForm`.
153158

154159
Example:
155160

@@ -200,9 +205,9 @@ Example:
200205

201206
```php
202207
new LinkInteraction(
203-
"id",
208+
'id',
204209
ExampleForm::class,
205-
"label"
210+
'label'
206211
)
207212
```
208213

@@ -258,9 +263,9 @@ Example:
258263

259264
```php
260265
new ToggleInteraction(
261-
"id",
262-
"enable/endpoint/%s",
263-
"disable/endpoint/%s"
266+
'id',
267+
'enable/endpoint/%s',
268+
'disable/endpoint/%s'
264269
)
265270
```
266271

@@ -352,7 +357,7 @@ class ExamplePage extends AbstractPage
352357
object: $this->exampleObject,
353358
redirectUrl: LinkHandler::getInstance()->getControllerLink(ExampleListPage::class),
354359
label: 'example label',
355-
reloadHeaderEndpoint: "exmaple/{$this->exampleObject->getObjectID()}/content-header-title"
360+
reloadHeaderEndpoint: "example/{$this->exampleObject->getObjectID()}/content-header-title"
356361
),
357362
]);
358363
}
@@ -366,7 +371,7 @@ class ExamplePage extends AbstractPage
366371
367372
{include file='header'}
368373
369-
...
374+
{* … *}
370375
371376
{include file='footer'}
372377
```

0 commit comments

Comments
 (0)