Skip to content

Commit dcc4bdb

Browse files
authored
Update RefererRedirect.md
1 parent 83de88b commit dcc4bdb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/Component/RefererRedirect.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ Let's set it up. Inside your controller:
2222
/**
2323
* @return void
2424
*/
25-
public function initialize() {
25+
public function initialize(): void {
2626
parent::initialize();
27-
$this->loadComponent('RefererRedirect', [
27+
$this->loadComponent('Tools.RefererRedirect', [
2828
'actions' => ['edit'],
2929
]);
3030
}
@@ -45,6 +45,7 @@ From your paginated and filtered index page you can now point to the edit page l
4545

4646
After successful save it will then redirect to exactly the current URL including all filter query strings, page, sort order etc.
4747

48+
You could also make this a RefererRedirect helper and handle that URL building internally.
4849

4950
## When not to use
5051
Make sure you are not using such approaches when linking to an action that removes an entity from the `view`/`edit` action of that entity.

0 commit comments

Comments
 (0)