RelationInterface.php in Relation 8
Same filename and directory in other branches
Contains \Drupal\relation\RelationInterface.
Namespace
Drupal\relationFile
src/RelationInterface.phpView source
<?php
/**
* @file
* Contains \Drupal\relation\RelationInterface.
*/
namespace Drupal\relation;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityChangedInterface;
use Drupal\user\EntityOwnerInterface;
/**
* Provides an interface defining a Relation entity.
*/
interface RelationInterface extends ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface {
/**
* Filters endpoints by entity type.
*
* Suitable for direct usage with entity_load_multiple().
*
* Example:
*
* @code
* $endpoints = $relation->endpoints();
* $users = entity_load_multiple('user', $endpoints['user']);
* @endcode
*
* Sample return value:
*
* @code
* array(
* "node" => array(5),
* "user" => array(2),
* );
* @endcode
*
* @return array
* An array where keys are entity type, and values are arrays containing
* entity IDs of endpoints.
*/
public function endpoints();
}
Interfaces
Name | Description |
---|---|
RelationInterface | Provides an interface defining a Relation entity. |