You are here

public function NodeType::isNewRevision in Drupal 8

Gets whether a new revision should be created by default.

Return value

bool TRUE if a new revision should be created by default.

Overrides NodeTypeInterface::isNewRevision

Deprecated

in drupal:8.3.0 and is removed from drupal:9.0.0. Use Drupal\Core\Entity\RevisionableEntityBundleInterface::shouldCreateNewRevision() instead.

See also

https://www.drupal.org/node/3067365

File

core/modules/node/src/Entity/NodeType.php, line 127

Class

NodeType
Defines the Node type configuration entity.

Namespace

Drupal\node\Entity

Code

public function isNewRevision() {
  @trigger_error('NodeType::isNewRevision is deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use Drupal\\Core\\Entity\\RevisionableEntityBundleInterface::shouldCreateNewRevision() instead. See https://www.drupal.org/node/3067365', E_USER_DEPRECATED);
  return $this
    ->shouldCreateNewRevision();
}