src/Reports/SiteSummary.php
protected function resolveCmsVersion()
    {
        $versionModules = [
            'silverstripe/framework' => 'Framework',
            'silverstripe/cms' => 'CMS',
        ];
        $this->extend('updateVersionModules', $versionModules);

        $records = $this->sourceRecords()->filter('Name', array_keys($versionModules));
        $versionParts = [];

        foreach ($versionModules as $name => $label) {
            $record = $records->find('Name', $name);
            if (!$record) {
                $version = _t(__CLASS__.'.VersionUnknown', 'Unknown');
            } else {
                $version = $record->Version;
            }

            $versionParts[] = "$label $version";
        }

        return implode(', ', $versionParts);
    }
protected function resolveCmsVersion()
    {
        $versionModules = [
            'silverstripe/framework' => 'Framework',
            'silverstripe/cms' => 'CMS',
        ];
        $this->extend('updateVersionModules', $versionModules);

        $records = $this->sourceRecords()->filter('Name', array_keys($versionModules));
        $versionParts = [];

        foreach ($versionModules as $name => $label) {
            $record = $records->find('Name', $name);
            if (!$record) {
                $version = _t(__CLASS__.'.VersionUnknown', 'Unknown');
            } else {
                $version = $record->Version;
            }

            $versionParts[] = "$label $version";
        }

        return implode(', ', $versionParts);
    }
protected function resolveCmsVersion ( ) { $ versionModules = [ 'silverstripe/framework' => 'Framework' , 'silverstripe/cms' => 'CMS' , ] ; $ this -> extend ( 'updateVersionModules' , $ versionModules ) ; $ records = $ this -> sourceRecords ( ) -> filter ( 'Name' , array_keys ( $ versionModules ) ) ; $ versionParts = [ ] ; foreach ( $ versionModules as $ name => $ label ) { $ record = $ records -> find ( 'Name' , $ name ) ; if ( ! $ record ) { $ version = _t ( __CLASS__ . '.VersionUnknown' , 'Unknown' ) ; } else { $ version = $ record -> Version ; } $ versionParts [ ] = "$label $version" ; } return implode ( ', ' , $ versionParts ) ; }
Extract CMS and Framework version details from the records in the report

@return string
Extract CMS and Framework version details from the records in the report