You are here

private function AllowedValuesConstraintValidator::mustBeValidatedByCore in Select (or other) 8

Same name and namespace in other branches
  1. 4.x 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
Checks if the passed value is valid.

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();
}