You are here

public function ConfigEntityRevisionsConfigEntityTrait::isNewRevision in Config Entity Revisions 8.2

Determines whether a new revision should be created on save.

Return value

bool TRUE if a new revision should be created.

See also

\Drupal\Core\Entity\EntityInterface::setNewRevision()

File

src/ConfigEntityRevisionsConfigEntityTrait.php, line 314

Class

ConfigEntityRevisionsConfigEntityTrait
Trait ConfigEntityRevisionsConfigEntityTrait.

Namespace

Drupal\config_entity_revisions

Code

public function isNewRevision() {
  return $this->newRevision || $this
    ->getEntityType()
    ->hasKey('revision') && !$this
    ->getRevisionId();
}