function StubRevisionableEntity::isDefaultRevision

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Entity/StubRevisionableEntity.php \Drupal\Tests\Core\Entity\StubRevisionableEntity::isDefaultRevision()

Checks if this entity is the default revision.

Parameters

bool $new_value: (optional) A Boolean to (re)set the isDefaultRevision flag.

Return value

bool TRUE if the entity is the default revision, FALSE otherwise. If $new_value was passed, the previous value is returned.

Overrides RevisionableInterface::isDefaultRevision

File

core/tests/Drupal/Tests/Core/Entity/StubRevisionableEntity.php, line 52

Class

StubRevisionableEntity
A stub revisionable entity for testing purposes.

Namespace

Drupal\Tests\Core\Entity

Code

public function isDefaultRevision($new_value = NULL) : bool {
  return FALSE;
}

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