protected function Dependency::getConstraint in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Extension/Dependency.php \Drupal\Core\Extension\Dependency::getConstraint()
Gets the Constraint object.
Return value
\Drupal\Component\Version\Constraint The Constraint object.
File
- core/
lib/ Drupal/ Core/ Extension/ Dependency.php, line 97
Class
- Dependency
- A value object representing dependency information.
Namespace
Drupal\Core\ExtensionCode
protected function getConstraint() {
if (!$this->constraint) {
$this->constraint = new Constraint($this->constraintString, \Drupal::CORE_COMPATIBILITY);
}
return $this->constraint;
}