public function LibraryItem::preSave

File

paragraphs/modules/paragraphs_library/src/Entity/LibraryItem.php, line 180

Class

LibraryItem
Defines the LibraryItem entity.

Namespace

Drupal\paragraphs_library\Entity

Code

public function preSave(EntityStorageInterface $storage) {

  // If no revision author has been set explicitly, make the entity owner the
  // revision author.
  if (!$this
    ->getRevisionUser()) {
    $this
      ->setRevisionUserId($this
      ->getOwnerId());
  }
  parent::preSave($storage);
}