ModuleVersion deprecated
final class ModuleVersion (View source)
deprecated
| internal |
Provides a module version value object.
Constants
| CORE_PREFIX |
The '8.x-' prefix is used on contrib module version numbers. |
Properties
| protected string | $majorVersion | The major version. |
|
| protected string|null | $versionExtra | The version extra string. |
Methods
Constructs a module version object from a version string.
Constructs a module version object from a support branch.
Gets the major version.
Gets the version extra string at the end of the version number.
Details
static ModuleVersion
createFromVersionString(string $version_string)
Constructs a module version object from a version string.
static ModuleVersion
createFromSupportBranch(string $branch)
Constructs a module version object from a support branch.
This can be used to determine the major version of the branch. ::getVersionExtra() will always return NULL for branches.
string
getMajorVersion()
Gets the major version.
string|null
getVersionExtra()
Gets the version extra string at the end of the version number.