interface RelationLinkManagerInterface

Same name in this branch
  1. 8.9.x core/modules/rest/src/LinkManager/RelationLinkManagerInterface.php \Drupal\rest\LinkManager\RelationLinkManagerInterface
Same name in other branches
  1. 9 core/modules/hal/src/LinkManager/RelationLinkManagerInterface.php \Drupal\hal\LinkManager\RelationLinkManagerInterface

Hierarchy

Expanded class hierarchy of RelationLinkManagerInterface

All classes that implement RelationLinkManagerInterface

1 file declares its use of RelationLinkManagerInterface
RelationLinkManagerInterface.php in core/modules/rest/src/LinkManager/RelationLinkManagerInterface.php

File

core/modules/hal/src/LinkManager/RelationLinkManagerInterface.php, line 5

Namespace

Drupal\hal\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 (or IANA link relation type) for the field.
     */
    public function getRelationUri($entity_type, $bundle, $field_name, $context = []);
    
    /**
     * Translates a REST URI into internal IDs.
     *
     * @param string $relation_uri
     *   Relation URI (or IANA link relation type) to transform into internal IDs.
     *
     * @return array
     *   Array with keys 'entity_type_id', 'bundle' and 'field_name'. For
     *   backwards compatibility, the entity_type key returns the full entity type
     *   object, this will be removed before Drupal 9.0.
     */
    public function getRelationInternalIds($relation_uri);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
ConfigurableLinkManagerInterface::setLinkDomain public function Sets the link domain used in constructing link URIs.
RelationLinkManagerInterface::getRelationInternalIds public function Translates a REST URI into internal IDs. 1
RelationLinkManagerInterface::getRelationUri public function Gets the URI that corresponds to a field. 1

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.