You are here

public function RelationInterface::endpoints in Relation 8.2

Same name and namespace in other branches
  1. 8 src/RelationInterface.php \Drupal\relation\RelationInterface::endpoints()

Filters endpoints by entity type.

Suitable for direct usage with entity_load_multiple().

Example:

$endpoints = $relation
  ->endpoints();
$users = entity_load_multiple('user', $endpoints['user']);

Sample return value:

array(
  "node" => array(
    5,
  ),
  "user" => array(
    2,
  ),
);

Return value

array An array where keys are entity type, and values are arrays containing entity IDs of endpoints.

1 method overrides RelationInterface::endpoints()
Relation::endpoints in src/Entity/Relation.php
Filters endpoints by entity type.

File

src/RelationInterface.php, line 44
Contains \Drupal\relation\RelationInterface.

Class

RelationInterface
Provides an interface defining a Relation entity.

Namespace

Drupal\relation

Code

public function endpoints();