function RevisionLogEntityTrait::setRevisionUser
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php \Drupal\Core\Entity\RevisionLogEntityTrait::setRevisionUser()
- 10 core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php \Drupal\Core\Entity\RevisionLogEntityTrait::setRevisionUser()
- 11.x core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php \Drupal\Core\Entity\RevisionLogEntityTrait::setRevisionUser()
Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionUser().
1 method overrides RevisionLogEntityTrait::setRevisionUser()
- BlockContent::setRevisionUser in core/
modules/ block_content/ src/ Entity/ BlockContent.php - Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionUser().
File
-
core/
lib/ Drupal/ Core/ Entity/ RevisionLogEntityTrait.php, line 91
Class
- RevisionLogEntityTrait
- Provides a trait for accessing revision logging and ownership information.
Namespace
Drupal\Core\EntityCode
public function setRevisionUser(UserInterface $account) {
$this->{$this->getEntityType()
->getRevisionMetadataKey('revision_user')}->entity = $account;
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.