You are here

protected function NodeForm::prepareEntity in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/node/src/NodeForm.php \Drupal\node\NodeForm::prepareEntity()

Prepares the entity object before the form is built first.

Overrides EntityForm::prepareEntity

File

core/modules/node/src/NodeForm.php, line 59
Contains \Drupal\node\NodeForm.

Class

NodeForm
Form controller for the node edit forms.

Namespace

Drupal\node

Code

protected function prepareEntity() {

  /** @var \Drupal\node\NodeInterface $node */
  $node = $this->entity;
  if (!$node
    ->isNew()) {

    // Remove the revision log message from the original node entity.
    $node->revision_log = NULL;
  }
}