Commit 16c5a8fa authored by alexpott's avatar alexpott

Issue #2879959 by chr.fritsch: Media should extend EditorialContentEntityBase

parent b5742e68
......@@ -2,14 +2,12 @@
namespace Drupal\media\Entity;
use Drupal\Core\Entity\EntityPublishedTrait;
use Drupal\Core\Entity\EditorialContentEntityBase;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Entity\RevisionableContentEntityBase;
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\media\MediaInterface;
use Drupal\Core\Entity\EntityChangedTrait;
use Drupal\media\MediaSourceEntityConstraintsInterface;
use Drupal\media\MediaSourceFieldConstraintsInterface;
use Drupal\user\UserInterface;
......@@ -82,10 +80,8 @@
* }
* )
*/
class Media extends RevisionableContentEntityBase implements MediaInterface {
class Media extends EditorialContentEntityBase implements MediaInterface {
use EntityChangedTrait;
use EntityPublishedTrait;
use StringTranslationTrait;
/**
......@@ -367,7 +363,6 @@ public function validate() {
*/
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
$fields = parent::baseFieldDefinitions($entity_type);
$fields += static::publishedBaseFieldDefinitions($entity_type);
$fields['name'] = BaseFieldDefinition::create('string')
->setLabel(t('Name'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment