Comment::getOwnerId

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; }

Comment::getOwner

public Comment::getOwner() Returns the entity owner's user entity. Return value \Drupal\user\UserInterface The owner user entity. Overrides EntityOwnerInterface::getOwner File core/modules/comment/src/Entity/Comment.php, line 523 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code public function getOwner() { $user = $this->get('uid')->entity; if (!$user || $user->isAnonymous()) { $user = User::getAnonymousUser(); $user->name =

Comment::getHostname

public Comment::getHostname() Returns the comment author's hostname. Return value string The hostname of the author of the comment. Overrides CommentInterface::getHostname File core/modules/comment/src/Entity/Comment.php, line 440 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code public function getHostname() { return $this->get('hostname')->value; }

Comment::getHomepage

public Comment::getHomepage() Returns the comment author's home page address. For anonymous authors, this is the value as typed in the comment form. Return value string The homepage address of the author of the comment. Overrides CommentInterface::getHomepage File core/modules/comment/src/Entity/Comment.php, line 425 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code public function getHomepage() { return $this->get('homepage')->value; }

Comment::getFieldName

public Comment::getFieldName() Returns the name of the field the comment is attached to. Return value string The name of the field the comment is attached to. Overrides CommentInterface::getFieldName File core/modules/comment/src/Entity/Comment.php, line 372 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code public function getFieldName() { return $this->get('field_name')->value; }

Comment::getCreatedTime

public Comment::getCreatedTime() Returns the time that the comment was created. Return value int The timestamp of when the comment was created. Overrides CommentInterface::getCreatedTime File core/modules/comment/src/Entity/Comment.php, line 455 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code public function getCreatedTime() { if (isset($this->get('created')->value)) { return $this->get('created')->value; } return NULL; }

Comment::getCommentedEntityTypeId

public Comment::getCommentedEntityTypeId() Returns the type of the entity to which the comment is attached. Return value string An entity type. Overrides CommentInterface::getCommentedEntityTypeId File core/modules/comment/src/Entity/Comment.php, line 357 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code public function getCommentedEntityTypeId() { return $this->get('entity_type')->value; }

Comment::getCommentedEntityId

public Comment::getCommentedEntityId() Returns the ID of the entity to which the comment is attached. Return value int The ID of the entity to which the comment is attached. Overrides CommentInterface::getCommentedEntityId File core/modules/comment/src/Entity/Comment.php, line 350 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code public function getCommentedEntityId() { return $this->get('entity_id')->target_id; }

Comment::getCommentedEntity

public Comment::getCommentedEntity() Returns the entity to which the comment is attached. Return value \Drupal\Core\Entity\FieldableEntityInterface The entity on which the comment is attached. Overrides CommentInterface::getCommentedEntity File core/modules/comment/src/Entity/Comment.php, line 343 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code public function getCommentedEntity() { return $this->get('entity_id')->entity; }

Comment::getAuthorName

public Comment::getAuthorName() Returns the comment author's name. For anonymous authors, this is the value as typed in the comment form. Return value string The name of the comment author. Overrides CommentInterface::getAuthorName File core/modules/comment/src/Entity/Comment.php, line 394 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code public function getAuthorName() { if ($this->get('uid')->target_id) { return $this->get('uid')->