function Constraint::__toString

Same name in other branches
  1. 9 core/lib/Drupal/Component/Version/Constraint.php \Drupal\Component\Version\Constraint::__toString()
  2. 10 core/lib/Drupal/Component/Version/Constraint.php \Drupal\Component\Version\Constraint::__toString()
  3. 11.x 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;
}

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