You are here

public function OpignoGroupManagedContent::getParentsLinks in Opigno group manager 3.x

Same name and namespace in other branches
  1. 8 src/Entity/OpignoGroupManagedContent.php \Drupal\opigno_group_manager\Entity\OpignoGroupManagedContent::getParentsLinks()

Returns parents links.

Return value

\Drupal\Core\Entity\EntityInterface[]|OpignoGroupManagedLink[] Parents links.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

File

src/Entity/OpignoGroupManagedContent.php, line 303

Class

OpignoGroupManagedContent
Defines the Opigno Group Content entity.

Namespace

Drupal\opigno_group_manager\Entity

Code

public function getParentsLinks() {
  return OpignoGroupManagedLink::loadByProperties([
    'group_id' => $this
      ->getGroupId(),
    'child_content_id' => $this
      ->id(),
  ]);
}