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->set('field_name', $field_name);
  return $this;
}
doc_Drupal
2016-10-29 08:50:24
Comments
Leave a Comment

Please login to continue.