class NoLanguageEntityTest in Drupal 10
Same name and namespace in other branches
- 8 core/modules/language/tests/language_test/src/Entity/NoLanguageEntityTest.php \Drupal\language_test\Entity\NoLanguageEntityTest
- 9 core/modules/language/tests/language_test/src/Entity/NoLanguageEntityTest.php \Drupal\language_test\Entity\NoLanguageEntityTest
Defines the test entity class.
Plugin annotation
@ContentEntityType(
id = "no_language_entity_test",
label = @Translation("Test entity without language support"),
handlers = {
"views_data" = "Drupal\entity_test\EntityTestViewsData"
},
base_table = "no_language_entity_test",
persistent_cache = FALSE,
entity_keys = {
"id" = "id",
"uuid" = "uuid",
},
)
Hierarchy
- class \Drupal\Core\Entity\EntityBase implements EntityInterface uses RefinableCacheableDependencyTrait, DependencySerializationTrait
- class \Drupal\Core\Entity\ContentEntityBase implements \Drupal\Core\Entity\IteratorAggregate, ContentEntityInterface, TranslationStatusInterface uses EntityChangesDetectionTrait, SynchronizableEntityTrait
- class \Drupal\language_test\Entity\NoLanguageEntityTest
- class \Drupal\Core\Entity\ContentEntityBase implements \Drupal\Core\Entity\IteratorAggregate, ContentEntityInterface, TranslationStatusInterface uses EntityChangesDetectionTrait, SynchronizableEntityTrait
Expanded class hierarchy of NoLanguageEntityTest
1 file declares its use of NoLanguageEntityTest
- ViewNonTranslatableEntityTest.php in core/
modules/ views/ tests/ src/ Functional/ Entity/ ViewNonTranslatableEntityTest.php
File
- core/
modules/ language/ tests/ language_test/ src/ Entity/ NoLanguageEntityTest.php, line 26
Namespace
Drupal\language_test\EntityView source
class NoLanguageEntityTest extends ContentEntityBase {
/**
* {@inheritdoc}
*/
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
$fields['id'] = BaseFieldDefinition::create('integer')
->setLabel(t('ID'))
->setDescription(t('The ID of the test entity.'))
->setReadOnly(TRUE)
->setSetting('unsigned', TRUE);
$fields['uuid'] = BaseFieldDefinition::create('uuid')
->setLabel(t('UUID'))
->setDescription(t('The UUID of the test entity.'))
->setReadOnly(TRUE);
return $fields;
}
}