function ContentEntityForm::prepareEntity

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/ContentEntityForm.php \Drupal\Core\Entity\ContentEntityForm::prepareEntity()

File

core/lib/Drupal/Core/Entity/ContentEntityForm.php, line 76

Class

ContentEntityForm
Entity form variant for content entity types.

Namespace

Drupal\Core\Entity

Code

protected function prepareEntity() {
  parent::prepareEntity();
  // Hide the current revision log message in UI.
  if ($this->showRevisionUi() && !$this->entity
    ->isNew() && $this->entity instanceof RevisionLogInterface) {
    $this->entity
      ->setRevisionLogMessage(NULL);
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.