You are here

public function Constraint::__toString in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Component/Version/Constraint.php \Drupal\Component\Version\Constraint::__toString()

Gets the constraint as a string.

Can be used in the UI for reporting incompatibilities.

Return value

string The constraint as a string.

File

core/lib/Drupal/Component/Version/Constraint.php, line 50

Class

Constraint
A value object representing a Drupal version constraint.

Namespace

Drupal\Component\Version

Code

public function __toString() {
  return $this->constraint;
}