You are here

public function Module::isInstalled in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Updater/Module.php \Drupal\Core\Updater\Module::isInstalled()
  2. 9 core/lib/Drupal/Core/Updater/Module.php \Drupal\Core\Updater\Module::isInstalled()

File

core/lib/Drupal/Core/Updater/Module.php, line 49

Class

Module
Defines a class for updating modules using Drupal\Core\FileTransfer\FileTransfer classes via authorize.php.

Namespace

Drupal\Core\Updater

Code

public function isInstalled() {

  // Check if the module exists in the file system, regardless of whether it
  // is enabled or not.

  /** @var \Drupal\Core\Extension\ExtensionList $module_extension_list */
  $module_extension_list = \Drupal::service('extension.list.module');
  return $module_extension_list
    ->exists($this->name);
}