You are here

private function GenerateTheme::getVersion in Drupal 10

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Command/GenerateTheme.php \Drupal\Core\Command\GenerateTheme::getVersion()

Gets the current Drupal major version.

Return value

string

File

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

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];
}