Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Module.php

function Module::canUpdate

Determines whether this class can update the specified project.

Parameters

string $project_name: The project to check.

Return value

bool

File

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

Class

Module
Defines a class for updating modules.

Namespace

Drupal\Core\Updater

Code

public static function canUpdate($project_name) {
    return (bool) \Drupal::service('extension.list.module')->getPath($project_name);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal