Conditions | 3 |
Paths | 2 |
Total Lines | 26 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function updateColumns($itemType, &$columns) |
||
24 | { |
||
25 | if ($itemType !== 'Pages') { |
||
26 | return; |
||
27 | } |
||
28 | |||
29 | // {@see SiteTreeContentReview::getOwnerNames()} |
||
30 | $columns['OwnerNames'] = [ |
||
31 | 'printonly' => true, // Hide on page report |
||
32 | 'title' => _t('SilverStripe\\SiteWideContentReport\\SitewideContentReport.Reviewer', 'Reviewer'), |
||
33 | ]; |
||
34 | |||
35 | // {@see SiteTreeContentView::getReviewDate()} |
||
36 | $columns['ReviewDate'] = [ |
||
37 | 'printonly' => true, // Hide on page report |
||
38 | 'title' => _t('SilverStripe\\SiteWideContentReport\\SitewideContentReport.ReviewDate', 'Review Date'), |
||
39 | 'formatting' => function ($value, $record) { |
||
40 | if ($val = $record->getReviewDate()) { |
||
41 | return $val->Nice(); |
||
42 | } |
||
43 | |||
44 | return null; |
||
45 | }, |
||
46 | ]; |
||
47 | |||
48 | return; |
||
49 | } |
||
51 |