You are here

public function RevisionLogEntityTrait::setRevisionUserId in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php \Drupal\Core\Entity\RevisionLogEntityTrait::setRevisionUserId()

Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionUserId().

2 calls to RevisionLogEntityTrait::setRevisionUserId()
Node::preSave in core/modules/node/src/Entity/Node.php
Acts on an entity before the presave hook is invoked.
Node::setRevisionAuthorId in core/modules/node/src/Entity/Node.php
Sets the node revision author.
1 method overrides RevisionLogEntityTrait::setRevisionUserId()
BlockContent::setRevisionUserId in core/modules/block_content/src/Entity/BlockContent.php
Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionUserId().

File

core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php, line 95

Class

RevisionLogEntityTrait
Provides a trait for accessing revision logging and ownership information.

Namespace

Drupal\Core\Entity

Code

public function setRevisionUserId($user_id) {
  $this->{static::getRevisionMetadataKey($this
    ->getEntityType(), 'revision_user')}->target_id = $user_id;
  return $this;
}