@@ -38,7 +38,7 @@ class CMSBatchActionHandler extends RequestHandler {
38
38
* action will be admin/batchactions/(urlSegment)
39
39
* @param $batchActionClass The name of the CMSBatchAction subclass to register
40
40
*/
41
- static function register ($ urlSegment , $ batchActionClass , $ recordClass = 'SiteTree ' ) {
41
+ public static function register ($ urlSegment , $ batchActionClass , $ recordClass = 'SiteTree ' ) {
42
42
if (is_subclass_of ($ batchActionClass , 'CMSBatchAction ' )) {
43
43
self ::$ batch_actions [$ urlSegment ] = array (
44
44
'class ' => $ batchActionClass ,
@@ -54,19 +54,19 @@ static function register($urlSegment, $batchActionClass, $recordClass = 'SiteTre
54
54
* @param string $urlSegment
55
55
* @param string $recordClass
56
56
*/
57
- function __construct ($ parentController , $ urlSegment , $ recordClass = null ) {
57
+ public function __construct ($ parentController , $ urlSegment , $ recordClass = null ) {
58
58
$ this ->parentController = $ parentController ;
59
59
$ this ->urlSegment = $ urlSegment ;
60
60
if ($ recordClass ) $ this ->recordClass = $ recordClass ;
61
61
62
62
parent ::__construct ();
63
63
}
64
64
65
- function Link () {
65
+ public function Link () {
66
66
return Controller::join_links ($ this ->parentController ->Link (), $ this ->urlSegment );
67
67
}
68
68
69
- function handleAction ($ request ) {
69
+ public function handleAction ($ request ) {
70
70
// This method can't be called without ajax.
71
71
if (!$ request ->isAjax ()) {
72
72
$ this ->parentController ->redirectBack ();
@@ -128,7 +128,7 @@ function handleAction($request) {
128
128
return $ actionHandler ->run ($ pages );
129
129
}
130
130
131
- function handleApplicablePages ($ request ) {
131
+ public function handleApplicablePages ($ request ) {
132
132
// Find the action handler
133
133
$ actions = Config::inst ()->get ($ this ->class , 'batch_actions ' , Config::FIRST_SET );
134
134
$ actionClass = $ actions [$ request ->param ('BatchAction ' )];
@@ -150,7 +150,7 @@ function handleApplicablePages($request) {
150
150
return $ response ;
151
151
}
152
152
153
- function handleConfirmation ($ request ) {
153
+ public function handleConfirmation ($ request ) {
154
154
// Find the action handler
155
155
$ actions = Config::inst ()->get ($ this ->class , 'batch_actions ' , Config::FIRST_SET );
156
156
$ actionClass = $ actions [$ request ->param ('BatchAction ' )];
@@ -177,7 +177,7 @@ function handleConfirmation($request) {
177
177
* - Link
178
178
* - Title
179
179
*/
180
- function batchActionList () {
180
+ public function batchActionList () {
181
181
$ actions = $ this ->batchActions ();
182
182
$ actionList = new ArrayList ();
183
183
@@ -202,7 +202,7 @@ function batchActionList() {
202
202
*
203
203
* @return array See {@link register()} for the returned format.
204
204
*/
205
- function batchActions () {
205
+ public function batchActions () {
206
206
$ actions = Config::inst ()->get ($ this ->class , 'batch_actions ' , Config::FIRST_SET );
207
207
if ($ actions ) foreach ($ actions as $ action ) {
208
208
if ($ action ['recordClass ' ] != $ this ->recordClass ) unset($ action );
0 commit comments