3 namespace Drupal\entity_test\Entity;
5 use Drupal\Core\Entity\EntityTypeInterface;
8 * Defines a test class for testing composite constraints.
11 * id = "entity_test_composite_constraint",
12 * label = @Translation("Test entity constraints with composite constraint"),
21 * "default" = "Drupal\entity_test\EntityTestForm"
24 * base_table = "entity_test_composite_constraint",
25 * persistent_cache = FALSE,
27 * "EntityTestComposite" = {},
28 * "EntityTestEntityLevel" = {},
32 class EntityTestCompositeConstraint extends EntityTest {
37 public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
38 $fields = parent::baseFieldDefinitions($entity_type);
40 $fields['name']->setDisplayOptions('form', [
45 $fields['type']->setDisplayOptions('form', [
46 'type' => 'entity_reference_autocomplete',