mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Adding upgrade docs on deprecated Director::redirect() and
Director::redirectBack()
This commit is contained in:
parent
fb7cd328cf
commit
48212aa840
@ -52,6 +52,17 @@ Note the different options for the third parameter of `get()`:
|
||||
If you don't set an option, it will get all the values for the static, including inherited ones.
|
||||
This was previously known as `Object::combined_static()`.
|
||||
|
||||
### Director static functions deprecated, Director::redirect() and Director::redirectBack() in particular
|
||||
|
||||
`Director::redirect()` and `Director::redirectBack()` are now marked as deprecated.
|
||||
|
||||
If you have a `Controller` instance and need to redirect, call `redirect()` or `redirectBack()` on the instance
|
||||
instead, e.g. `$controller->redirect()` or `$controller->redirectBack()`. Most of the time, form action handler
|
||||
methods on a controller need only call `$this->redirect()` or `$this->redirectBack()`.
|
||||
|
||||
Use `Controller::curr()->redirect()` and `Controller::curr()->redirectBack()` if you need to redirect in contexts
|
||||
where a controller might not be immediately available.
|
||||
|
||||
### DataExtension and deprecated extraStatics on extension classes {#extensions}
|
||||
|
||||
`DataObjectDecorator` has been renamed to `DataExtension`. Any classes that extend `DataObjectDecorator`
|
||||
|
Loading…
x
Reference in New Issue
Block a user