1 | <?php |
||
2 | |||
3 | namespace CWP\Search; |
||
4 | |||
5 | use Page; |
||
6 | use SilverStripe\Security\Permission; |
||
7 | use SilverStripe\Versioned\Versioned; |
||
8 | |||
9 | /** |
||
10 | * Dummy page to assist with display of search results |
||
11 | */ |
||
12 | class CwpSearchPage extends Page |
||
13 | { |
||
14 | private static $hide_ancestor = CwpSearchPage::class; |
||
15 | |||
16 | private static $plural_name = 'Search pages'; |
||
17 | |||
18 | private static $table_name = 'CwpSearchPage'; |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
19 | |||
20 | public function canViewStage($stage = Versioned::LIVE, $member = null) |
||
21 | { |
||
22 | if (Permission::checkMember($member, 'VIEW_DRAFT_CONTENT')) { |
||
23 | return true; |
||
24 | } |
||
25 | |||
26 | return parent::canViewStage($stage, $member); |
||
27 | } |
||
28 | } |
||
29 |