silverstripe-environmentcheck/code/DevCheckController.php
2014-08-22 16:14:15 +12:00

16 lines
377 B
PHP

<?php
class DevCheckController extends Controller {
public static $allowed_actions = array(
'index'
);
function index($request) {
$suiteName = $request->param('Suite') ? $request->param('Suite') : 'check';
$e = new EnvironmentChecker($suiteName, 'Environment status');
$e->init('ADMIN'); //check for admin permissions before running this check
return $e;
}
}