You are here

private function AllowedValuesConstraintValidator::mustBeValidatedByCore in Select (or other) 4.x

Same name and namespace in other branches
  1. 8 src/Plugin/Validation/AllowedValuesConstraintValidator.php \Drupal\select_or_other\Plugin\Validation\AllowedValuesConstraintValidator::mustBeValidatedByCore()
1 call to AllowedValuesConstraintValidator::mustBeValidatedByCore()
AllowedValuesConstraintValidator::validate in src/Plugin/Validation/AllowedValuesConstraintValidator.php

File

src/Plugin/Validation/AllowedValuesConstraintValidator.php, line 79

Class

AllowedValuesConstraintValidator
Validates the AllowedValues constraint.

Namespace

Drupal\select_or_other\Plugin\Validation

Code

private function mustBeValidatedByCore(TypedDataInterface $typed_data) {
  return !$typed_data instanceof ListItemBase || $typed_data
    ->getFieldDefinition()
    ->getFieldStorageDefinition()
    ->isBaseField();
}