-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NEW Adding an extension for the silverstripe-maintenance "Site Summar…
…y" report to display a more appropriate version label
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
/** | ||
* Extends the site summary report to list the appropriate versions in the report header | ||
*/ | ||
class CwpSiteSummaryExtension extends Extension | ||
{ | ||
|
||
/** | ||
* Updates the modules used for the version label by: | ||
* - Removing SS Framework | ||
* - Adding CWP | ||
* - Relabelling SS CMS | ||
* | ||
* @param $modules | ||
*/ | ||
public function updateVersionModules(&$modules) | ||
{ | ||
unset($modules['silverstripe/framework']); | ||
$modules = ['cwp/cwp' => 'CWP'] + $modules; | ||
$modules['silverstripe/cms'] = 'SilverStripe CMS'; | ||
} | ||
} |