You are here

public function Dependency::isCompatible in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Extension/Dependency.php \Drupal\Core\Extension\Dependency::isCompatible()

Determines if the provided version is compatible with this dependency.

Parameters

string $version: The version to check, for example '4.2'.

Return value

bool TRUE if compatible with the provided version, FALSE if not.

File

core/lib/Drupal/Core/Extension/Dependency.php, line 108

Class

Dependency
A value object representing dependency information.

Namespace

Drupal\Core\Extension

Code

public function isCompatible($version) {
  return $this
    ->getConstraint()
    ->isCompatible($version);
}