You are here

interface RelationLinkManagerInterface in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/rest/src/LinkManager/RelationLinkManagerInterface.php \Drupal\rest\LinkManager\RelationLinkManagerInterface

Hierarchy

Expanded class hierarchy of RelationLinkManagerInterface

All classes that implement RelationLinkManagerInterface

File

core/modules/rest/src/LinkManager/RelationLinkManagerInterface.php, line 10
Contains \Drupal\rest\LinkManager\RelationLinkManagerInterface.

Namespace

Drupal\rest\LinkManager
View source
interface RelationLinkManagerInterface extends ConfigurableLinkManagerInterface {

  /**
   * Gets the URI that corresponds to a field.
   *
   * When using hypermedia formats, this URI can be used to indicate which
   * field the data represents. Documentation about this field can also be
   * provided at this URI.
   *
   * @param string $entity_type
   *   The bundle's entity type.
   * @param string $bundle
   *   The bundle name.
   * @param string $field_name
   *   The field name.
   * @param array $context
   *   (optional) Optional serializer/normalizer context.
   *
   * @return string
   *   The corresponding URI for the field.
   */
  public function getRelationUri($entity_type, $bundle, $field_name, $context = array());

  /**
   * Translates a REST URI into internal IDs.
   *
   * @param string $relation_uri
   *   Relation URI to transform into internal IDs
   *
   * @return array
   *   Array with keys 'entity_type', 'bundle' and 'field_name'.
   */
  public function getRelationInternalIds($relation_uri);

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableLinkManagerInterface::setLinkDomain public function Sets the link domain used in constructing link URIs. 1
RelationLinkManagerInterface::getRelationInternalIds public function Translates a REST URI into internal IDs. 2
RelationLinkManagerInterface::getRelationUri public function Gets the URI that corresponds to a field. 2