Same filename in this branch
- 10 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php
- 10 core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestCompositeConstraint.php
Same filename and directory in other branches
- 8.9.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php
- 9 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php
Namespace
Drupal\entity_test\Entity
File
core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php
View source
<?php
namespace Drupal\entity_test\Entity;
use Drupal\Core\Entity\EntityTypeInterface;
class EntityTestCompositeConstraint extends EntityTest {
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
$fields = parent::baseFieldDefinitions($entity_type);
$fields['name']
->setDisplayOptions('form', [
'type' => 'string',
'weight' => 0,
]);
$fields['type']
->setDisplayOptions('form', [
'type' => 'entity_reference_autocomplete',
'weight' => 0,
]);
return $fields;
}
}
Classes