NodeForm::prepareEntity

protected NodeForm::prepareEntity()

Prepares the entity object before the form is built first.

Overrides EntityForm::prepareEntity

File

core/modules/node/src/NodeForm.php, line 54

Class

NodeForm
Form handler 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;
  }
}
doc_Drupal
2016-10-29 09:30:45
Comments
Leave a Comment

Please login to continue.