public function Module::isInstalled in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Updater/Module.php \Drupal\Core\Updater\Module::isInstalled()
Checks if the project is installed.
Return value
bool
Overrides UpdaterInterface::isInstalled
1 call to Module::isInstalled()
- Module::getInstallDirectory in core/
lib/ Drupal/ Core/ Updater/ Module.php - Returns the directory where a module should be installed.
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\UpdaterCode
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);
}