class StubRevisionableEntity
A stub revisionable entity for testing purposes.
Hierarchy
- class \Drupal\Core\Entity\EntityBase implements \Drupal\Core\Entity\EntityInterface uses \Drupal\Core\Cache\RefinableCacheableDependencyTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait
- class \Drupal\Tests\Core\Entity\StubEntityBase extends \Drupal\Core\Entity\EntityBase
- class \Drupal\Tests\Core\Entity\StubRevisionableEntity extends \Drupal\Tests\Core\Entity\StubEntityBase implements \Drupal\Core\Entity\RevisionableInterface
- class \Drupal\Tests\Core\Entity\StubEntityBase extends \Drupal\Core\Entity\EntityBase
Expanded class hierarchy of StubRevisionableEntity
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ StubRevisionableEntity.php, line 13
Namespace
Drupal\Tests\Core\EntityView source
class StubRevisionableEntity extends StubEntityBase implements RevisionableInterface {
/**
* {@inheritdoc}
*/
public function isNewRevision() : bool {
return FALSE;
}
/**
* {@inheritdoc}
*/
public function setNewRevision($value = TRUE) : void {
}
/**
* {@inheritdoc}
*/
public function getRevisionId() : int|string|null {
return NULL;
}
/**
* {@inheritdoc}
*/
public function getLoadedRevisionId() : ?int {
return NULL;
}
/**
* {@inheritdoc}
*/
public function updateLoadedRevisionId() : static {
return $this;
}
/**
* {@inheritdoc}
*/
public function isDefaultRevision($new_value = NULL) : bool {
return FALSE;
}
/**
* {@inheritdoc}
*/
public function wasDefaultRevision() : bool {
return FALSE;
}
/**
* {@inheritdoc}
*/
public function isLatestRevision() : bool {
return FALSE;
}
/**
* {@inheritdoc}
*/
public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record) : void {
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.