public static function EntityTestComposite::baseFieldDefinitions

File

sources/content/tests/modules/tmgmt_composite_test/src/Entity/EntityTestComposite.php, line 38

Class

EntityTestComposite
Defines the test entity class.

Namespace

Drupal\tmgmt_composite_test\Entity

Code

public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
  $fields = parent::baseFieldDefinitions($entity_type);
  $fields['parent_type'] = BaseFieldDefinition::create('string')
    ->setLabel(t('Parent type'))
    ->setDescription(t('The entity parent type to which this entity is referenced.'));
  return $fields;
}