You are here

public function Comment::setFieldName in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 385
Contains \Drupal\comment\Entity\Comment.

Class

Comment
Defines the comment entity class.

Namespace

Drupal\comment\Entity

Code

public function setFieldName($field_name) {
  $this
    ->set('field_name', $field_name);
  return $this;
}