function Link::getLinkRelationType

Same name in other branches
  1. 9 core/modules/jsonapi/src/JsonApiResource/Link.php \Drupal\jsonapi\JsonApiResource\Link::getLinkRelationType()
  2. 10 core/modules/jsonapi/src/JsonApiResource/Link.php \Drupal\jsonapi\JsonApiResource\Link::getLinkRelationType()
  3. 11.x core/modules/jsonapi/src/JsonApiResource/Link.php \Drupal\jsonapi\JsonApiResource\Link::getLinkRelationType()

Gets the link's relation type.

Return value

string The link's relation type.

File

core/modules/jsonapi/src/JsonApiResource/Link.php, line 126

Class

Link
Represents an RFC8288 based link.

Namespace

Drupal\jsonapi\JsonApiResource

Code

public function getLinkRelationType() {
    return reset($this->rel);
}

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