EntityTestRev.php in Multiversion 8.2
Namespace
Drupal\multiversion\EntityFile
src/Entity/EntityTestRev.phpView source
<?php
namespace Drupal\multiversion\Entity;
use Drupal\Core\Entity\EntityPublishedInterface;
use Drupal\Core\Entity\EntityPublishedTrait;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\entity_test\Entity\EntityTestRev as CoreEntityTestRev;
use Drupal\user\StatusItem;
class EntityTestRev extends CoreEntityTestRev implements EntityPublishedInterface {
use EntityPublishedTrait;
/**
* {@inheritdoc}
*/
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
$fields = parent::baseFieldDefinitions($entity_type);
// Add the published field.
$fields += static::publishedBaseFieldDefinitions($entity_type);
// @todo Remove the usage of StatusItem in
// https://www.drupal.org/project/drupal/issues/2936864.
$fields['status']
->getItemDefinition()
->setClass(StatusItem::class);
return $fields;
}
}
Classes
Name | Description |
---|---|
EntityTestRev |