You are here

public function TokenAuthUser::setNewRevision in Simple OAuth (OAuth2) & OpenID Connect 8

Same name and namespace in other branches
  1. 8.4 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::setNewRevision()
  2. 8.2 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::setNewRevision()
  3. 8.3 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::setNewRevision()
  4. 5.x src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::setNewRevision()

Enforces an entity to be saved as a new revision.

Parameters

bool $value: (optional) Whether a new revision should be saved.

Throws

\LogicException Thrown if the entity does not support revisions.

Overrides RevisionableInterface::setNewRevision

See also

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

File

src/Authentication/TokenAuthUser.php, line 591

Class

TokenAuthUser
Class TokenAuthUser.

Namespace

Drupal\simple_oauth\Authentication

Code

public function setNewRevision($value = TRUE) {
  $this->subject
    ->setNewRevision($value);
}