function GenerateTheme::getVersion

Gets the current Drupal major version.

Return value

string

1 call to GenerateTheme::getVersion()
GenerateTheme::execute in core/lib/Drupal/Core/Command/GenerateTheme.php

File

core/lib/Drupal/Core/Command/GenerateTheme.php, line 386

Class

GenerateTheme
Generates a new theme based on latest default markup.

Namespace

Drupal\Core\Command

Code

private function getVersion() : string {
    return explode('.', \Drupal::VERSION)[0];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.