NoLanguageEntityTest.php
Same filename in other branches
Namespace
Drupal\language_test\EntityFile
-
core/
modules/ language/ tests/ language_test/ src/ Entity/ NoLanguageEntityTest.php
View source
<?php
declare (strict_types=1);
namespace Drupal\language_test\Entity;
use Drupal\Core\Entity\Attribute\ContentEntityType;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Entity\ContentEntityBase;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\entity_test\EntityTestViewsData;
/**
* Defines the test entity class.
*/
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;
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
NoLanguageEntityTest | Defines the test entity class. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.