SilverStripeVersionProvider
class SilverStripeVersionProvider (View source)
The version provider will look up configured modules and examine the composer.lock file to find the current version installed for each. This is used for the logo title in the CMS via LeftAndMain::CMSVersion()
Example configuration:
SilverStripeVersionProvider:
modules:
# package/name: Package Title
silverstripe/framework: Framework
silverstripe/cms: CMS
Methods
Gets the configured core modules to use for the SilverStripe application version. Filtering is used to ensure that modules can turn the result off for other modules, e.g. CMS can disable Framework.
Tries to obtain version number from composer.lock if it exists
Details
string
getVersion()
Gets a comma delimited string of package titles and versions
array
getModules()
Gets the configured core modules to use for the SilverStripe application version. Filtering is used to ensure that modules can turn the result off for other modules, e.g. CMS can disable Framework.
array
getModuleVersionFromComposer(array $modules = array())
Tries to obtain version number from composer.lock if it exists
protected array
getComposerLock(bool $cache = true)
Load composer.lock's contents and return it