Set the parent entity of the paragraph.
\Drupal\Core\Entity\ContentEntityInterface $parent: The parent entity.
string $parent_field_name: The parent field name.
$this
Overrides ParagraphInterface::setParentEntity
public function setParentEntity(ContentEntityInterface $parent, $parent_field_name) {
$this
->set('parent_type', $parent
->getEntityTypeId());
$this
->set('parent_id', $parent
->id());
$this
->set('parent_field_name', $parent_field_name);
return $this;
}