public function Dependency::isCompatible in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Extension/Dependency.php \Drupal\Core\Extension\Dependency::isCompatible()
- 9 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\ExtensionCode
public function isCompatible($version) {
return $this
->getConstraint()
->isCompatible($version);
}