Implements \Drupal\Component\Plugin\Context\ContextInterface::getConstraints().
Overrides Context::getConstraints
public function getConstraints() {
if (!empty($this->contextDefinition['type'])) {
// If we do have typed data, leverage it for getting constraints.
return $this
->getTypedContext()
->getConstraints();
}
return parent::getConstraints();
}