public Comment::getOwnerId()
Returns the entity owner's user ID.
Return value
int|null The owner user ID, or NULL in case the user ID field has not been set on the entity.
Overrides EntityOwnerInterface::getOwnerId
File
- core/modules/comment/src/Entity/Comment.php, line 536
Class
- Comment
- Defines the comment entity class.
Namespace
Drupal\comment\Entity
Code
public function getOwnerId() { return $this->get('uid')->target_id; }
Please login to continue.