public function ParagraphInterface::setParentEntity in Paragraphs 8
Set the parent entity of the paragraph.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $parent: The parent entity.
string $parent_field_name: The parent field name.
Return value
$this
1 method overrides ParagraphInterface::setParentEntity()
- Paragraph::setParentEntity in src/
Entity/ Paragraph.php - Set the parent entity of the paragraph.
File
- src/
ParagraphInterface.php, line 36
Class
- ParagraphInterface
- Provides an interface defining a paragraphs entity.
Namespace
Drupal\paragraphsCode
public function setParentEntity(ContentEntityInterface $parent, $parent_field_name);