1 | <?php |
||
2 | |||
3 | namespace Dynamic\FoxyStripe\Page; |
||
4 | |||
5 | use SilverStripe\Security\Security; |
||
6 | |||
7 | /** |
||
8 | * Class OrderHistoryPageController |
||
9 | * @package Dynamic\FoxyStripe\Page |
||
10 | * |
||
11 | * @mixin OrderHistoryPage |
||
12 | */ |
||
13 | class OrderHistoryPageController extends \PageController |
||
14 | { |
||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | private static $allowed_actions = array( |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
19 | 'index', |
||
20 | ); |
||
21 | |||
22 | /** |
||
23 | * @return bool|\SilverStripe\Control\HTTPResponse |
||
24 | */ |
||
25 | public function checkMember() |
||
26 | { |
||
27 | if (Security::getCurrentUser()) { |
||
28 | return true; |
||
29 | } else { |
||
30 | return Security::permissionFailure($this, _t( |
||
31 | 'AccountPage.CANNOTCONFIRMLOGGEDIN', |
||
32 | 'Please login to view this page.' |
||
33 | )); |
||
34 | } |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return array |
||
39 | */ |
||
40 | public function Index() |
||
41 | { |
||
42 | $this->checkMember(); |
||
43 | |||
44 | return array(); |
||
45 | } |
||
46 | } |
||
47 |