function RevisionLogEntityTrait::setRevisionUserId
Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionUserId().
1 call to RevisionLogEntityTrait::setRevisionUserId()
- Node::preSave in core/
modules/ node/ src/ Entity/ Node.php - Acts on an entity before the presave hook is invoked.
File
-
core/
lib/ Drupal/ Core/ Entity/ RevisionLogEntityTrait.php, line 106
Class
- RevisionLogEntityTrait
- Provides a trait for accessing revision logging and ownership information.
Namespace
Drupal\Core\EntityCode
public function setRevisionUserId($user_id) {
$this->{$this->getEntityType()
->getRevisionMetadataKey('revision_user')}->target_id = $user_id;
return $this;
}