3 namespace Drupal\entity_test\Entity;
4 use Drupal\Core\Entity\EntityTypeInterface;
7 * Defines a test class for testing composite constraints.
10 * id = "entity_test_composite_constraint",
11 * label = @Translation("Test entity constraints with composite constraint"),
20 * "default" = "Drupal\entity_test\EntityTestForm"
23 * base_table = "entity_test_composite_constraint",
24 * persistent_cache = FALSE,
26 * "EntityTestComposite" = {},
27 * "EntityTestEntityLevel" = {},
31 class EntityTestCompositeConstraint extends EntityTest {
36 public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
37 $fields = parent::baseFieldDefinitions($entity_type);
39 $fields['name']->setDisplayOptions('form', [
44 $fields['type']->setDisplayOptions('form', [
45 'type' => 'entity_reference_autocomplete',