public function Comment::setOwner in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/comment/src/Entity/Comment.php \Drupal\comment\Entity\Comment::setOwner()
Sets the entity owner's user entity.
Parameters
\Drupal\user\UserInterface $account: The owner user entity.
Return value
$this
Overrides EntityOwnerInterface::setOwner
File
- core/
modules/ comment/ src/ Entity/ Comment.php, line 572 - Contains \Drupal\comment\Entity\Comment.
Class
- Comment
- Defines the comment entity class.
Namespace
Drupal\comment\EntityCode
public function setOwner(UserInterface $account) {
$this
->set('uid', $account
->id());
return $this;
}