Implements \Drupal\Core\TypedData\TypedDataInterface::getConstraints().
Overrides TypedDataInterface::getConstraints
public function getConstraints() {
// @todo: Add the typed data manager as proper dependency.
return \Drupal::typedData()
->getConstraints($this->definition);
}