You are here

public function Paragraph::getOwner in Paragraphs 8

Overrides EntityOwnerInterface::getOwner

Deprecated

Paragraphs no longer have their own author, check the parent entity instead.

File

src/Entity/Paragraph.php, line 258

Class

Paragraph
Defines the Paragraph entity.

Namespace

Drupal\paragraphs\Entity

Code

public function getOwner() {
  $parent = $this
    ->getParentEntity();
  if ($parent instanceof EntityOwnerInterface) {
    return $parent
      ->getOwner();
  }
  else {
    return NULL;
  }
}