Total Complexity | 3 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class SiteSummaryExtension extends Extension |
||
9 | { |
||
10 | /** |
||
11 | * Update screen bound report columns to remove the text (csv) column |
||
12 | * listing SecurityAlert Identifier numbers, and include the view assets to render appropriately |
||
13 | * |
||
14 | * @param array $columns Report display columns |
||
15 | */ |
||
16 | public function updateColumns(&$columns) |
||
17 | { |
||
18 | Requirements::css( |
||
19 | 'bringyourownideas/silverstripe-composer-security-checker: client/dist/css/securityalerts.css' |
||
20 | ); |
||
21 | Requirements::javascript( |
||
22 | 'bringyourownideas/silverstripe-composer-security-checker: client/dist/javascript/summaryalerts.js' |
||
23 | ); |
||
24 | unset($columns['listSecurityAlertIdentifiers']); |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * Update the Package's screen bound summary info with little badges to indicate |
||
29 | * security alerts are present for this package |
||
30 | * |
||
31 | * @param array $alerts a list of alerts to display |
||
32 | */ |
||
33 | public function updateAlerts(&$alerts) |
||
39 | } |
||
40 | } |
||
42 |