public function Comment::setFieldName in Drupal 8
Same name and namespace in other branches
- 9 core/modules/comment/src/Entity/Comment.php \Drupal\comment\Entity\Comment::setFieldName()
- 10 core/modules/comment/src/Entity/Comment.php \Drupal\comment\Entity\Comment::setFieldName()
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 376
Class
- Comment
- Defines the comment entity class.
Namespace
Drupal\comment\EntityCode
public function setFieldName($field_name) {
$this
->set('field_name', $field_name);
return $this;
}