function 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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.