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
if ($lastEntry['description'] !== $description || $lastEntry['entity'] !== $entity) {
44
+
if ($requestOverride) {
45
+
if (isset($requestOverride['controller'])) $request->setControllerName($requestOverride['controller']);
46
+
if (isset($requestOverride['action'])) $request->setControllerActionName($requestOverride['action']);
47
+
if (isset($requestOverride['package'])) $request->setControllerPackageKey($requestOverride['package']);
48
+
if (isset($requestOverride['subpackage'])) $request->setControllerSubpackageKey($requestOverride['subpackage']);
49
+
if (isset($requestOverride['arguments'])) $request->setArguments($this->persistenceManager->convertObjectsToIdentityArrays($requestOverride['arguments']));
A session scope class to record requests of a user. Handy for example to provide a list of recently edited records or handle redirects in a backend interface.
3
+
4
+
A request history for Neos FLow applications.
5
+
This package was mainly build for CRUD like backend interfaces but can be used for a lot of use cases.
6
+
7
+
## What does it do?
8
+
9
+
It provides a session scope object with the possibility to add requests into a history stack.
10
+
With this history it is possible for example to handle back-links or redirects back to the previous page after some action.
11
+
12
+
## Adding Entries
13
+
14
+
Inject the UserActionHistory into your controller and add entries like that. You should not add unsafe requests (e.g. POST) to the history because if you redirect to them later it will have unexpected results.
If you want to redirect to the previous request for example in an updateAction you can do the following.
23
+
Notice that you can provide action patterns to skip (for example if you do not want to redirect to the editAction but to the request previous to that).
24
+
25
+
```
26
+
if ($lastRequest = $this->userActionHistory->getLastActionRequest('UserManagement->edit')) {
27
+
$this->redirectToRequest($lastRequest);
28
+
} else {
29
+
$this->redirect('index');
30
+
}
31
+
```
32
+
33
+
34
+
## Displaying a linked list of history items
35
+
36
+
If you want to build a menu of your last visited pages (or last edited records in a CRUD application) you would to it like that.
0 commit comments