File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public function updateEditForm($form)
1111 new GridFieldMasqueradeButton ()
1212 )
1313 ->getComponentByType ('GridFieldDetailForm ' )
14- ->setItemRequestClass ('MasqueradeGridFieldDetailForm_ItemRequest ' )
14+ ->setItemRequestClass ('MasqueradeGridFieldDetailForm_ItemRequest ' )
1515 ;
1616 }
1717
Original file line number Diff line number Diff line change @@ -23,4 +23,26 @@ public function logout($redirect = true)
2323 }
2424 }
2525
26+ /**
27+ * Returns the SS_HTTPResponse object that this controller is building up.
28+ * Can be used to set the status code and headers
29+ */
30+ public function getResponse () {
31+ if (!$ this ->response ) {
32+ $ this ->setResponse (new SS_HTTPResponse ());
33+ }
34+ return $ this ->response ;
35+ }
36+
37+ /**
38+ * Sets the SS_HTTPResponse object that this controller is building up.
39+ *
40+ * @param SS_HTTPResponse $response
41+ * @return Controller
42+ */
43+ public function setResponse (SS_HTTPResponse $ response ) {
44+ $ this ->response = $ response ;
45+ return $ this ;
46+ }
47+
2648}
You can’t perform that action at this time.
0 commit comments