Comment::setOwner

public Comment::setOwner(UserInterface $account) 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 551 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code public function setOwner(UserInterface $account) { $this->set('uid', $account->id()); return $this; }

Comment::setFieldName

public Comment::setFieldName($field_name) Sets the field ID for which this comment is attached. Parameters string $field_name: The field name through which the comment was added. Return value $this The class instance that this method is called on. Overrides CommentInterface::setFieldName File core/modules/comment/src/Entity/Comment.php, line 364 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code public function setFieldName($field_name) { $this->

Comment::setCreatedTime

public Comment::setCreatedTime($created) Sets the creation date of the comment. Parameters int $created: The timestamp of when the comment was created. Return value $this The class instance that this method is called on. Overrides CommentInterface::setCreatedTime File core/modules/comment/src/Entity/Comment.php, line 465 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code public function setCreatedTime($created) { $this->set('created', $created);

Comment::setHomepage

public Comment::setHomepage($homepage) Sets the comment author's home page address. For anonymous authors, this is the value as typed in the comment form. Parameters string $homepage: The homepage address of the author of the comment. Return value $this The class instance that this method is called on. Overrides CommentInterface::setHomepage File core/modules/comment/src/Entity/Comment.php, line 432 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code

Comment::setHostname

public Comment::setHostname($hostname) Sets the hostname of the author of the comment. Parameters string $hostname: The hostname of the author of the comment. Return value $this The class instance that this method is called on. Overrides CommentInterface::setHostname File core/modules/comment/src/Entity/Comment.php, line 447 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code public function setHostname($hostname) { $this->set('hostname', $hostna

Comment::setAuthorName

public Comment::setAuthorName($name) Sets the name of the author of the comment. Parameters string $name: A string containing the name of the author. Return value $this The class instance that this method is called on. Overrides CommentInterface::setAuthorName File core/modules/comment/src/Entity/Comment.php, line 404 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code public function setAuthorName($name) { $this->set('name', $name); return $th

Comment::preCreate

public static Comment::preCreate(EntityStorageInterface $storage, array &$values) Changes the values of an entity before it is created. Load defaults for example. Parameters \Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object. mixed[] $values: An array of values to set, keyed by property name. If the entity type has bundles the bundle key has to be specified. Overrides Entity::preCreate File core/modules/comment/src/Entity/Comment.php, line 513 Class Comment

Comment::referencedEntities

public Comment::referencedEntities() Gets a list of entities referenced by this entity. Return value \Drupal\Core\Entity\EntityInterface[] An array of entities. Overrides ContentEntityBase::referencedEntities File core/modules/comment/src/Entity/Comment.php, line 190 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code public function referencedEntities() { $referenced_entities = parent::referencedEntities(); if ($this->getCommentedEntityId()) {

Comment::preSave

public Comment::preSave(EntityStorageInterface $storage) Acts on an entity before the presave hook is invoked. Used before the entity is saved and before invoking the presave hook. Note that in case of translatable content entities this callback is only fired on their current translation. It is up to the developer to iterate over all translations if needed. This is different from its counterpart in the Field API, FieldItemListInterface::preSave(), which is fired on all field translations automa

Comment::releaseThreadLock

protected Comment::releaseThreadLock() Release the lock acquired for the thread in preSave(). File core/modules/comment/src/Entity/Comment.php, line 166 Class Comment Defines the comment entity class. Namespace Drupal\comment\Entity Code protected function releaseThreadLock() { if ($this->threadLock) { \Drupal::lock()->release($this->threadLock); $this->threadLock = ''; } }